35 lines
755 B
Plaintext
35 lines
755 B
Plaintext
upstream wordpress {
|
|
server civi:9000;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
root /usr/src/wordpress;
|
|
client_max_body_size 32m;
|
|
|
|
index index.php;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$args;
|
|
}
|
|
|
|
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
|
|
|
|
location ~ [^/]\.php(/|$) {
|
|
proxy_read_timeout 3600;
|
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
|
if (!-f $document_root$fastcgi_script_name) {
|
|
return 404;
|
|
}
|
|
|
|
include fastcgi_params;
|
|
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 wordpress;
|
|
fastcgi_index index.php;
|
|
}
|
|
}
|