Files
nginx/docker/nginx.conf
2024-11-02 17:32:33 +03:00

46 lines
1.1 KiB
Nginx Configuration File

server {
listen 80 default_server;
server_name _;
root /app/public;
#add_header X-Frame-Options "SAMEORIGIN";
#add_header X-XSS-Protection "1; mode=block";
#add_header X-Content-Type-Options "nosniff";
#add_header X-Forwarded-Proto https;
add_header 'Access-Control-Allow-Origin' '*';
index index.html index.htm index.php;
charset utf-8;
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; }
#error_log /var/log/nginx/container_error.log;
#access_log /var/log/nginx/container_access.log;
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
#fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php-fpm.sock;
#fastcgi_pass php-app:9000;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
}