2019-08-05 07:09:14 +00:00
|
|
|
server {
|
|
|
|
index index.php index.html;
|
|
|
|
|
|
|
|
listen 80 default_server;
|
|
|
|
listen [::]:80 default_server;
|
|
|
|
|
|
|
|
server_name localhost;
|
|
|
|
|
|
|
|
client_max_body_size 1g;
|
|
|
|
|
|
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
access_log /var/log/nginx/access.log;
|
|
|
|
|
|
|
|
root /var/www/${LOCAL_DIR};
|
|
|
|
|
2019-08-12 08:28:33 +00:00
|
|
|
absolute_redirect off;
|
|
|
|
|
Bootstrap/Load: Add support for custom ports in multisite site addresses.
This allows a Multisite network to use an address that includes a port name, such as `example.com:1234`, and adds support for this to the local development environment too. You can now run a Multisite installation on the local development environment, for example at `localhost:8889`.
This also fixes some bugs with running a single site installation on a port, and updates the testing infrastructure so that the whole test suite runs both with and without a port number.
Props djzone, scribu, nacin, ipstenu, F J Kaiser, jeremyfelt, johnjamesjacoby, spacedmonkey, PerS, Clorith, Blackbam, enrico.sorcinelli, Jules Colle, obliviousharmony, desrosj, johnbillion
Fixes #21077, #52088
git-svn-id: https://develop.svn.wordpress.org/trunk@58097 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-04 19:23:31 +00:00
|
|
|
if (!-e $request_filename) {
|
|
|
|
rewrite /wp-admin$ $scheme://$host$request_uri/ permanent;
|
|
|
|
rewrite ^(/[^/]+)?(/wp-.*) $2 last;
|
|
|
|
rewrite ^(/[^/]+)?(/.*\.php) $2 last;
|
|
|
|
}
|
|
|
|
|
2019-08-05 07:09:14 +00:00
|
|
|
location / {
|
|
|
|
try_files $uri $uri/ /index.php?$args;
|
|
|
|
}
|
|
|
|
|
|
|
|
location ~ \.php$ {
|
|
|
|
try_files $uri =404;
|
|
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
|
|
fastcgi_pass php:9000;
|
|
|
|
fastcgi_index index.php;
|
|
|
|
include fastcgi_params;
|
|
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
2020-10-27 18:32:22 +00:00
|
|
|
fastcgi_pass_header Authorization;
|
2019-08-05 07:09:14 +00:00
|
|
|
}
|
|
|
|
}
|