Besides apache web server, you can also use nginx (engine x) as web server on your xubuntu, if you prefer nginx over apache. In this article i will show you how to install nginx on xubuntu 16.04.
Before we start installing nginx on xubuntu, if you currently have apache web server running on your system, you need to stop it first, or you can uninstall it if you really want to switch to nginx completely.
stopping apache web server service
sudo service apache2 stop
Why you need to stop or uninstall apache web server before installing nginx? because two service can't use the same port, both apache and nginx use port 80 as default port.
Step by step how to install Nginx on xubuntu 16.04
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)
the configuration file for nginx is located at
How to start, stop, restart and check status of Nginx
start nginx service
restart nginx service
check the status of nginx service
Step by step how to install Nginx on xubuntu 16.04
- open command line (press CTRL + ALT + T)
- run this command to install nginx
sudo apt-get install nginx
/var/www/html/
/etc/nginx/sites-enabled/default
How to start, stop, restart and check status of Nginx
- stop nginx service
sudo service nginx stop
sudo service nginx start
sudo service nginx restart
sudo service nginx status