# Laravel application vhost for nyone.app. # Copy to /etc/nginx/sites-available/nyone-app.conf and symlink into sites-enabled. # Adjust root and fastcgi_pass for your server. server { listen 80; listen [::]:80; server_name nyone.app; return 301 https://$host$request_uri; } server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name nyone.app; root /var/www/nyone/public; index index.php; ssl_certificate /etc/letsencrypt/live/nyone.app/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/nyone.app/privkey.pem; add_header X-Frame-Options "SAMEORIGIN" always; add_header X-Content-Type-Options "nosniff" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; charset utf-8; client_max_body_size 100M; location / { try_files $uri $uri/ /index.php?$query_string; } location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } location ~* \.(?:css|js|mjs|map|jpg|jpeg|gif|png|svg|ico|webp|avif|woff|woff2|ttf)$ { expires 30d; access_log off; try_files $uri /index.php?$query_string; } location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/run/php/php8.4-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; fastcgi_param DOCUMENT_ROOT $realpath_root; fastcgi_param HTTPS on; fastcgi_read_timeout 120s; } location ~ /\.(?!well-known).* { deny all; } }