docker-dotclear/alpine/nginx/latest/nginx.conf

67 lines
No EOL
1.8 KiB
Nginx Configuration File

; docker-dotclear:latest
user www;
daemon off;
worker_processes auto;
error_log /dev/stderr notice;
pid /var/run/nginx/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
#access_log /var/log/nginx/access.log;
keepalive_timeout 3000;
server {
listen 80;
root /var/www/html;
index index.php index.html;
server_name localhost;
client_max_body_size 32m;
#error_page 500 502 503 504 /50x.html;
location ~ ^/(db|cache|plugins|inc) {
deny all;
return 404;
}
location / {
try_files $uri $uri/ @dotclear_path_info;
}
location @dotclear_path_info {
rewrite ^/(.*) /index.php/$1 last;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
include fastcgi_params;
set $path_info $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/run/php-fpm.sock;
fastcgi_index index.php;
}
location ~ ^/(fpm-ping)$ {
access_log off;
allow 127.0.0.1;
deny all;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_pass unix:/run/php-fpm.sock;
}
}
}