server { if ($host = www.joinfediverse.org) { return 301 https://$host$request_uri; } # managed by Certbot if ($host = joinfediverse.org) { return 301 https://$host$request_uri; } # managed by Certbot listen 80; listen [::]:80; server_name joinfediverse.org www.joinfediverse.org; root /home/www/joinfediverse/public; } server { listen 443 http2; listen [::]:443 http2; server_name joinfediverse.org www.joinfediverse.org; # root /home/www/joinfediverse/demo/joinfediverse/dist; root /home/www/joinfediverse/public; # Use Mozilla's guidelines for SSL/TLS settings # https://mozilla.github.io/server-side-tls/ssl-config-generator/ # NOTE: some settings below might be redundant # ssl_certificate /etc/letsencrypt/live/joinfediverse.org/fullchain.pem; # managed by Certbot # ssl_certificate_key /etc/letsencrypt/live/joinfediverse.org/privkey.pem; # managed by Certbot location / { # try to serve file directly, fallback to index.php try_files $uri /index.html$is_args$args; } error_log /var/log/nginx/joinfediverse_error.log; access_log /var/log/nginx/joinfediverse_access.log; }