How to install Nginx on Lubuntu 16.04

Nginx (engine x) is a high performance web server and a reverse proxy server, the difference with apache web server is that nginx is more fo... thumbnail 1 summary
How to install Nginx on Lubuntu 16.04

Nginx (engine x) is a high performance web server and a reverse proxy server, the difference with apache web server is that nginx is more focus on performance (speed). In this article i will show you how to install nginx web server on lubuntu 16.04.

Before we begin the tutorial, just make sure you understand that you can't have the same program using the same port. Therefore if you currently have an apache web server running on your machine, it cannot be using the same port as nginx.

By default both apache and nginx are using port 80 as the default port, yes you can have two web server running on your lubuntu but they need to be on different port. So either change default port for apache or nginx if you want both web server running.

Anyway, if you want to stop the apache web server service you can use the command below:
sudo service apache2 stop
If you want to get rid of apache and switch to nginx completely, you can uninstall apache using this command:
sudo apt-get purge apache2
sudo apt-get autoremove


Step by step how to install Nginx on lubuntu 16.04
  • open command line (press CTRL + ALT + T)
  • run this command to install nginx
  • sudo apt-get install nginx
  • the default port of nginx is same as apache web server which is port 80 (you can change this in the configuration file)
  • the default root directory of nginx is same as apache web server (you can change this in the configuration file)
  • /var/www/html/
  • the configuration file for nginx is located at
  • /etc/nginx/sites-enabled/default



How to start, stop, restart and check status of Nginx
  • stop nginx service
  • sudo service nginx stop
  • start nginx service
  • sudo service nginx start
  • restart nginx service
  • sudo service nginx restart
  • check the status of nginx service
  • sudo service nginx status


2 nhận xét

  1. MGM Grand Hotel and Casino | Dr. Maryland
    MGM Grand Hotel and Casino offers 창원 출장샵 a great experience 김해 출장샵 for all guests. 속초 출장샵 We have a variety of options for booking rooms at different prices and will 경상남도 출장안마 update 인천광역 출장샵 it daily.

    Trả lờiXóa
  2. Las Vegas' Wynn Casino - JTM Hub
    Casino. Wynn is a $4 https://febcasino.com/review/merit-casino/ billion resort with https://deccasino.com/review/merit-casino/ four hotel towers with 5,750 nba매니아 rooms and suites. Each of the septcasino hotel towers includes a 20,000 square foot casino and 출장안마 a

    Trả lờiXóa