1) To find path of nginx.conf file.
locate nginx.conf
It will give you locaiton of nginx file.
/usr/local/nginx/conf/nginx.conf
/usr/local/nginx/conf/nginx.conf.default
2)To set domain name
Edit nginx.conf.default
nano /usr/local/nginx/conf/nginx.conf.default
Change server_name settings
server {
listen 80;
server_name localhost; #instead of localhost set live domain name like abc.com
access_log logs/localhost.access.log main;
location / {
root html;
index index.html index.htm;
}
}
}
3)After making of any changes in nginx.conf file you need to reload it.
/etc/init.d/nginx reload
4)After making any changes of project files on server you need to restart nginx server.
/etc/init.d/nginx restart
5)To kill process of nginx
ps aux | egrep '(PID|nginx)'
and kill the PID
Refer site:http://library.linode.com/web-servers/nginx/configuration/basic
locate nginx.conf
It will give you locaiton of nginx file.
/usr/local/nginx/conf/nginx.conf
/usr/local/nginx/conf/nginx.conf.default
2)To set domain name
Edit nginx.conf.default
nano /usr/local/nginx/conf/nginx.conf.default
Change server_name settings
server {
listen 80;
server_name localhost; #instead of localhost set live domain name like abc.com
access_log logs/localhost.access.log main;
location / {
root html;
index index.html index.htm;
}
}
}
3)After making of any changes in nginx.conf file you need to reload it.
/etc/init.d/nginx reload
4)After making any changes of project files on server you need to restart nginx server.
/etc/init.d/nginx restart
5)To kill process of nginx
ps aux | egrep '(PID|nginx)'
and kill the PID
Refer site:http://library.linode.com/web-servers/nginx/configuration/basic
No comments:
Post a Comment