Nginx is a lightweight and powerful web server. It is commonly used as a reverse proxy and load balancer.
Install Nginx using your package manager. On Ubuntu:
Main configuration file is typically located at:
Install Nginx using your package manager. On Ubuntu:
sudo apt install nginxTo start the service:
sudo systemctl start nginxTo check status:
sudo systemctl status nginxOpen your browser and navigate to your server IP. If you see the Nginx welcome page, it is working.
Main configuration file is typically located at:
/etc/nginx/nginx.confServer blocks are usually inside:
/etc/nginx/sites-available/A simple server block example:
server {
listen 80;
server_name example.com;
root /var/www/html;
index index.html;
}
After editing configuration:
sudo nginx -t sudo systemctl reload nginxNginx is fast, efficient, and production ready. It is a great addition to your toolbox.
Disclaimer: If you follow the information here, there is no warranty, I am not liable if it deletes your data, gets you hacked, burns your house down or anything else. If you follow the information contained here you do so entirely at your own risk. My views and opinions are my own and not necessarily represent the views of my employer. © Raheel Hameed and www.raheelhameed.com, 2017. Unauthorized use and/or duplication of this material without express and written permission from this site’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to author and this website with appropriate and specific direction to the original content.
Disclaimer: If you follow the information here, there is no warranty, I am not liable if it deletes your data, gets you hacked, burns your house down or anything else. If you follow the information contained here you do so entirely at your own risk. My views and opinions are my own and not necessarily represent the views of my current or former employers. © Raheel Hameed and www.raheelhameed.com, 2017. Unauthorized use and/or duplication of this material without express and written permission from this site’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to author and this website with appropriate and specific direction to the original content.
Comments
Post a Comment