How to install nginx and install the configuration files too

Posted by Burning the Codeigniter on Server Fault See other posts from Server Fault or by Burning the Codeigniter
Published on 2011-09-30T10:50:49Z Indexed on 2012/09/09 3:40 UTC
Read the original article Hit count: 646

Filed under:
|
|

I've just completely uninstalled nginx 1.0.6 from my server (Ubuntu 11.04) using

apt-get remove nginx 
rm -rf /etc/nginx/
rm -rf /usr/sbin/nginx
rm /usr/share/man/man1/nginx.1.gz
apt-get remove nginx*

Now I want to install it again, however when starting nginx, I get errors such as:

Restarting nginx: nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)

Then I placed my own conf file, then I get a new error:

Restarting nginx: nginx: [emerg] open() "/etc/nginx/mime.types" failed (2: No such file or directory) in /etc/nginx/nginx.conf:12

Now it seems that apt-get install nginx doesn't install it completely, I cleared the apt-get cache, doesn't seem to help. How can I get a full installation of nginx using apt-get?

© Server Fault or respective owner

Related posts about ubuntu

Related posts about nginx