This is an old revision of the document!


React

server {
    listen 80 default_server;
    server_name www.schedukal.ml schedukal.ml;
    access_log /var/log/nginx/access-SITENAME.log;
 
    root /web/schedukal.ml;
    index index.php index.html;
 
    location / {
        try_files $uri /index.html;
    }
 
    location ~ \.php$ {
        fastcgi_pass unix:/run/php/php7.2-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        include fastcgi_params;
    }
 
    location ~ /\.(?!well-known).*{
        deny all;
    }
    error_page 404 /404.html;
 
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/kalen.pw/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/kalen.pw/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}