Reputation: 138
i am running a vps with apache. just installed nginx. got the address already in use error at port 80 because apache is using it. I am new to linux/apache stuff so is it possible to change the port of nginx and how ? if yes will it work as i want it to serve static files automaticaly or should i get my hosting company to do it instead since i don't know much about these.
and yes i used this tutorial to install it http://library.linode.com/web-servers/nginx/installation/centos-5
Help Appreciated :)
Thanks in advance
Upvotes: 1
Views: 4363
Reputation: 28830
Look either into
nginx.conf
filesites-enabled
(usually under the nginx
directory)and search the server
part, listen
server {
listen 80;
here you can change the port for 81 for instance instead of 80.
Notes:
server { listen }
part within your nginx.conf
directly/etc/nginx
(nginx.conf) and sites-enabled
is below that directory.service apache stop
or service httpd stop
or /etc/init.d/apache stop
(or httpd) should work to stop the process, or try killall httpd
or killall apache
(or apache2) to stop Apache.Upvotes: 3