2019-11-11 Installation of nginxΒΆ

I switched to nginx as lighttpd started to fail. To install it:

apt-get install nginx-light

The configuration is stored in /etc/nginx/sites-available/default:

server {
        listen 80 default_server;
        listen [::]:80 default_server;

        # listen 443 ssl default_server;
        # listen [::]:443 ssl default_server;

        root /home/ftpuser/ftp/web;

        index index.html index.htm index.nginx-debian.html;

        server_name www.xavierdupre.fr;

        location / {
                try_files $uri $uri/ =404;
                autoindex on;

A few useful commmand:

systemctl stop nginx
systemctl start nginx
systemctl restart nginx

The https protocol can be set up by following the instructions Configuring HTTPS servers.