38 lines
1 KiB
Text
38 lines
1 KiB
Text
# tinyauth-web on its own subdomain: https://tinyauth-web.example.com/
|
|
#
|
|
# Only public/ is served, so config.php and data/ are never reachable.
|
|
# Test with `nginx -t`, then reload nginx. Adjust the paths and the PHP-FPM socket.
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name tinyauth-web.example.com;
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
http2 on;
|
|
server_name tinyauth-web.example.com;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/tinyauth-web.example.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/tinyauth-web.example.com/privkey.pem;
|
|
|
|
root /var/www/tinyauth-web/public;
|
|
index index.php;
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_pass unix:/run/php/php8.4-fpm.sock; # match your PHP-FPM socket
|
|
}
|
|
|
|
location ~ /\. {
|
|
deny all;
|
|
}
|
|
}
|