-
Notifications
You must be signed in to change notification settings - Fork 3
Installing Nginx
Tip: Never log in as root. Log in as normal user and use $ sudo su
to get root access.
# apt-get update && apt-get install nginx
Now the Nginx server will be running. Use the following code to initialize server when reboot occurs.
# update-rc.d nginx defaults
Enable extra packages for enterprise linux
# yum install epel-release
Install nginx
# yum update && yum install nginx
To start the server when system reboot
# chkconfig --add nginx
# chkconfig --levels 235 nginx on
Try the following commands if 403 Error occurs,
chcon -R -t httpd_sys_content_t /srv/www/
or
chcon -R -t httpd_sys_rw_content_t /srv/www/
The service name of the server is 'nginx'. You need sudo/root user privilege to use the following commands.
# service nginx start
# service nginx stop
# service nginx restart
To test configuration
# nginx -t
Note: Nginx service need to be restarted when ever nginx configuration is changed.
Check this link for more info
The Mozilla Foundation invites all others who support the principles of the Mozilla Manifesto to join with us, and to find new ways to make this vision of the Internet a reality.