mirror of
https://github.com/casjaysdevdocker/tor
synced 2025-10-14 02:02:18 -04:00
Dockerfile README.md rootfs/tmp/etc/nginx/nginx.conf rootfs/tmp/etc/nginx/vhosts.d/admin.conf rootfs/usr/local/bin/entrypoint.sh rootfs/usr/local/etc/docker/init.d/99-php-fpm.sh rootfs/usr/local/share/
38 lines
1.0 KiB
Plaintext
38 lines
1.0 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name admin.tor localhost;
|
|
root /usr/local/share/webpanel;
|
|
index index.php;
|
|
|
|
access_log /data/logs/nginx/admin.access.log;
|
|
error_log /data/logs/nginx/admin.error.log;
|
|
|
|
# Security headers
|
|
add_header X-Frame-Options "DENY" always;
|
|
add_header X-XSS-Protection "1; mode=block" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
|
|
# PHP processing
|
|
location ~ \.php$ {
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
fastcgi_index index.php;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
include fastcgi_params;
|
|
}
|
|
|
|
# Static files
|
|
location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
# Deny access to sensitive files
|
|
location ~ /\.(ht|git) {
|
|
deny all;
|
|
}
|
|
|
|
location ~ \.(conf|log|txt)$ {
|
|
deny all;
|
|
}
|
|
} |