server { listen 80; server_name investemoz.tempo.co.mz; location ^~ /.well-known/acme-challenge/ { root /var/www/letsencrypt; try_files $uri =404; } location / { return 301 https://investemoz.tempo.co.mz$request_uri; } } server { listen 443 ssl; server_name investemoz.tempo.co.mz; root /var/www/investemoz/public; index index.php; charset utf-8; server_tokens off; client_max_body_size 10m; ssl_certificate /etc/letsencrypt/live/investemoz.tempo.co.mz/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/investemoz.tempo.co.mz/privkey.pem; ssl_protocols TLSv1.2 TLSv1.3; add_header X-Content-Type-Options nosniff always; add_header X-Frame-Options SAMEORIGIN always; add_header Referrer-Policy strict-origin-when-cross-origin always; location / { try_files $uri $uri/ /index.php?$query_string; } location = /index.php { include fastcgi_params; fastcgi_param SCRIPT_FILENAME $realpath_root/index.php; fastcgi_param DOCUMENT_ROOT $realpath_root; fastcgi_param HTTPS on; # Match the installed PHP-FPM socket before enabling. fastcgi_pass unix:/run/php/php8.5-fpm.sock; } location ~ \.php(?:/|$) { return 404; } location ~ /\. { deny all; } location = /hot { return 404; } location /build/ { try_files $uri =404; } }