imgsort2/resources/imgsort2-nginx.conf
2024-09-02 14:56:56 +02:00

36 lines
1.0 KiB
Nginx Configuration File

# vi: ft=nginx
server {
listen 8080 default_server;
server_name localhost;
# Optional security related headers
# add_header Content-Security-Policy "default-src 'self';";
# add_header Strict-Transport-Security "max-age=31536000;"; # includeSubDomains"
# add_header X-Frame-Options "SAMEORIGIN";
# add_header X-Content-Type-Options "nosniff";
# add_header Referrer-Policy "origin-when-cross-origin";
# access_log /var/log/nginx/imgsort2-access.log;
# error_log /var/log/nginx/imgsort2-error.log;
root /www/imgsort2;
index index.html;
location /images {
alias /data/images;
}
# TODO: Access restriction
# https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/
# auth_basic "Imgsort 2";
# auth_basic_user_file /etc/www/.imgsort2.htpasswd;
location ~ .*\.php$ {
# TODO: this depends on your php-fpm configuration
fastcgi_pass unix:/var/run/php/php-fpm-imgsort2.sock;
include fastcgi.conf;
}
}