49 lines
1.0 KiB
Plaintext
49 lines
1.0 KiB
Plaintext
server {
|
|
listen 80;
|
|
index index.php index.html;
|
|
access_log /dev/stdout;
|
|
error_log /dev/stderr;
|
|
|
|
server_name diplom-generator;
|
|
|
|
root /var/www/html;
|
|
|
|
# Private IP address ranges
|
|
set_real_ip_from 172.16.0.0/12;
|
|
set_real_ip_from 192.168.0.0/16;
|
|
set_real_ip_from 10.0.0.0/8;
|
|
real_ip_header X-Real-IP;
|
|
|
|
# Deny access to hidden files/folders
|
|
location ~ /\. {
|
|
deny all;
|
|
}
|
|
|
|
location ~* composer\. {
|
|
deny all;
|
|
}
|
|
|
|
location ~ (Dockerfile|docker-compose\.yml) {
|
|
deny all;
|
|
}
|
|
|
|
location /vendor {
|
|
deny all;
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
try_files $uri =404;
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
fastcgi_index index.php;
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$query_string;
|
|
gzip_static on;
|
|
}
|
|
}
|