ComposePress/default.conf
2025-06-02 00:50:27 +00:00

45 lines
1.2 KiB
Plaintext

# https://www.nginx.com/resources/wiki/start/topics/recipes/mediawiki/
# https://www.nginx.com/resources/wiki/start/topics/recipes/wordpress/
server {
listen 80;
listen [::]:80;
server_name wordpress;
root /var/www/html;
index index.php;
#access_log /var/log/nginx/host.access.log main;
location / {
try_files $uri $uri/ /index.php?$args;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# pass the PHP scripts to FastCGI server listening on wordpress2:9000
#
location ~ \.php$ {
#fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass wordpress:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
# fastcgi_param PHP_VALUE "upload_max_filesize=8M";
fastcgi_param PHP_VALUE "upload_max_filesize=8M; post_max_size=128M; memory_limit=256M";
}
# location ~* \.(jpg|jpeg|gif|png|css|js|ico)$ {
# expires max;
# log_not_found off;
# }
}