Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 2588  / 2 Years ago, thu, september 22, 2022, 5:02:54

after removing nginx, I re-installed it with sudo apt-get install nginx.



Output indicated that the installation was successful.



But there's no directory /etc/nginx and sudo service nginx start fails because it can't read the config file.



How can I fix this?


More From » 12.04

 Answers
4

The configuration files are provided by the nginx-common package, not nginx. Therefore you have to purge nginx-common:



sudo apt-get purge nginx-common
sudo apt-get install nginx


(nginx depends on nginx-common, removing nginx-common will also remove nginx.)



There is no need to add the nginx PPA just for getting back the configuration files.


[#27849] Thursday, September 22, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
quivedge

Total Points: 223
Total Questions: 116
Total Answers: 124

Location: Slovenia
Member since Wed, Apr 6, 2022
2 Years ago
;