random-web-tools/docker/conf/etc/nginx/http.d/default.conf

34 lines
689 B
Plaintext
Raw Permalink Normal View History

2024-11-04 16:45:27 +02:00
server {
listen 80;
server_name default;
root /var/www/html;
2024-11-04 18:07:51 +02:00
index index.html;
2024-11-04 16:45:27 +02:00
client_max_body_size 5m;
client_body_timeout 60;
location / {
2024-11-04 18:07:51 +02:00
try_files $uri $uri/ /index.html;
2024-11-04 16:45:27 +02:00
2024-11-04 18:07:51 +02:00
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.html last;
}
2024-11-04 16:45:27 +02:00
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/run/php/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
2024-11-04 18:07:51 +02:00
try_files $uri /index.html;
2024-11-04 16:45:27 +02:00
expires max;
log_not_found off;
}
2024-11-05 12:06:11 +02:00
error_log /dev/stderr warn;
access_log /dev/stdout;
2024-11-04 16:45:27 +02:00
}