I'm working on a new website for our company. We have a WordPress install with a lot of bloated code which we want to replace piece by piece. So i want to work with 2 WordPress install. I have the following local folder structure:
home
- vagrant
-- code
--- www
---- web
----- index.php
--- www-new
---- web
----- index.php
We've made the following NGINX config file:
server {
listen 80;
listen 443 ssl http2;
server_name .dev.mysite.com;
root "/home/vagrant/code/www/web";
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
if (!-e $request_filename) {
set $wp_multisite 1;
}
if ($wp_multisite = 1){
rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) /wp$1 last;
rewrite ^/[_0-9a-zA-Z-]+.*(/wp-admin/.*\.php)$ /wp$1 last;
rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ /wp$1 last;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
}
location ^~ /wp-json/mynamespace/v2 {
rewrite ^/wp-json/mynamespace/v2/?(.*)$ /wp-json/mynamespace/v2/public/dev.mysite.com last;
}
location ^~ /wp-json/mynamespace/v2/public {
root /home/vagrant/code/www-new/web;
try_files $uri $uri/ /index.php$is_args$args;
location ~* \.php(/|$) {
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}
When i go to https://dev.mysite.com/a-page, everything is working fine. But when i visit https://dev.mysite.com/wp-json/mynamespace/v2 or https://dev.mysite.com/wp-json/mynamespace/v2/endpoint, it's still loading the /home/vagrant/code/www/web/index.php file.
When i check my /var/log/nginx/dev.mysite.com-error.log. I can see that the URL matches the correct location block and NGINX is trying to use the file /home/vagrant/code/www-new/web/index.php. After that, there's an internal redirect and it's using /home/vagrant/code/www/web/index.php. I don't understand why NGINX is internal redirecting to the old file.
I've also tried the following blocks
location ~* ^/wp-json/mynamespace/v2/ {
root /home/vagrant/code/www-new/web;
try_files \$uri \$uri/ /index.php;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
}
}
This one came from the official NGINX site:
location ~* ^/wp-json/mynamespace/v2/ {
alias /home/vagrant/code/www-new/web/;
location ~* \.php(/|$) {
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param DOCUMENT_ROOT \$document_root;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}
}
Here's the complete error log for the request. I've prefixed the for what i think most relevant lines with pipes.
2021/05/05 09:35:56 [debug] 4595#4595: accept on 0.0.0.0:80, ready: 0
2021/05/05 09:35:56 [debug] 4596#4596: accept on 0.0.0.0:443, ready: 0
2021/05/05 09:35:56 [debug] 4595#4595: posix_memalign: 0000563F91FFD790:512 @16
2021/05/05 09:35:56 [debug] 4595#4595: *9 accept: 192.168.100.1:50022 fd:15
2021/05/05 09:35:56 [debug] 4595#4595: *9 event timer add: 15: 60000:2476615
2021/05/05 09:35:56 [debug] 4595#4595: *9 reusable connection: 1
2021/05/05 09:35:56 [debug] 4595#4595: *9 epoll add event: fd:15 op:1 ev:80002001
2021/05/05 09:35:56 [debug] 4596#4596: posix_memalign: 0000563F91FFD790:512 @16
2021/05/05 09:35:56 [debug] 4595#4595: accept on 0.0.0.0:443, ready: 0
2021/05/05 09:35:56 [debug] 4596#4596: *10 accept: 192.168.100.1:50024 fd:15
2021/05/05 09:35:56 [debug] 4595#4595: accept() not ready (11: Resource temporarily unavailable)
2021/05/05 09:35:56 [debug] 4596#4596: *10 event timer add: 15: 60000:2476615
2021/05/05 09:35:56 [debug] 4596#4596: *10 reusable connection: 1
2021/05/05 09:35:56 [debug] 4595#4595: accept on 0.0.0.0:80, ready: 0
2021/05/05 09:35:56 [debug] 4596#4596: *10 epoll add event: fd:15 op:1 ev:80002001
2021/05/05 09:35:56 [debug] 4595#4595: posix_memalign: 0000563F920BBB70:512 @16
2021/05/05 09:35:56 [debug] 4595#4595: *11 accept: 192.168.100.1:50023 fd:16
2021/05/05 09:35:56 [debug] 4595#4595: *11 event timer add: 16: 60000:2476615
2021/05/05 09:35:56 [debug] 4595#4595: *11 reusable connection: 1
2021/05/05 09:35:56 [debug] 4595#4595: *11 epoll add event: fd:16 op:1 ev:80002001
2021/05/05 09:35:56 [debug] 4596#4596: *10 http check ssl handshake
2021/05/05 09:35:56 [debug] 4596#4596: *10 http recv(): 1
2021/05/05 09:35:56 [debug] 4596#4596: *10 https ssl handshake: 0x16
2021/05/05 09:35:56 [debug] 4596#4596: *10 tcp_nodelay
2021/05/05 09:35:56 [debug] 4596#4596: *10 reusable connection: 0
2021/05/05 09:35:56 [debug] 4596#4596: *10 SSL server name: "dev.mysite.com"
2021/05/05 09:35:56 [debug] 4596#4596: *10 SSL ALPN supported by client: h2
2021/05/05 09:35:56 [debug] 4596#4596: *10 SSL ALPN supported by client: http/1.1
2021/05/05 09:35:56 [debug] 4596#4596: *10 SSL ALPN selected: h2
2021/05/05 09:35:56 [debug] 4596#4596: *10 SSL_do_handshake: -1
2021/05/05 09:35:56 [debug] 4596#4596: *10 SSL_get_error: 2
2021/05/05 09:35:56 [debug] 4596#4596: *10 SSL handshake handler: 0
2021/05/05 09:35:56 [debug] 4596#4596: *10 SSL_do_handshake: -1
2021/05/05 09:35:56 [debug] 4596#4596: *10 SSL_get_error: 1
2021/05/05 09:35:56 [info] 4596#4596: *10 SSL_do_handshake() failed (SSL: error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown:SSL alert number 46) while SSL handshaking, client: 192.168.100.1, server: 0.0.0.0:443
2021/05/05 09:35:56 [debug] 4596#4596: *10 close http connection: 15
2021/05/05 09:35:56 [debug] 4596#4596: *10 event timer del: 15: 2476615
2021/05/05 09:35:56 [debug] 4596#4596: *10 reusable connection: 0
2021/05/05 09:35:56 [debug] 4596#4596: *10 free: 0000563F91FFD790, unused: 123
2021/05/05 09:35:56 [debug] 4595#4595: *9 http wait request handler
2021/05/05 09:35:56 [debug] 4595#4595: *9 malloc: 0000563F91FFE1A0:1024
2021/05/05 09:35:56 [debug] 4595#4595: *9 recv: eof:0, avail:-1
2021/05/05 09:35:56 [debug] 4595#4595: *9 recv: fd:15 824 of 1024
2021/05/05 09:35:56 [debug] 4595#4595: *9 reusable connection: 0
2021/05/05 09:35:56 [debug] 4595#4595: *9 posix_memalign: 0000563F9201E4F0:4096 @16
2021/05/05 09:35:56 [debug] 4595#4595: *9 http process request line
2021/05/05 09:35:56 [debug] 4595#4595: *9 http request line: "GET /wp-json/mynamespace/v2 HTTP/1.1"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http uri: "/wp-json/mynamespace/v2"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http args: ""
2021/05/05 09:35:56 [debug] 4595#4595: *9 http exten: ""
2021/05/05 09:35:56 [debug] 4595#4595: *9 posix_memalign: 0000563F920477A0:4096 @16
2021/05/05 09:35:56 [debug] 4595#4595: *9 http process request header line
2021/05/05 09:35:56 [debug] 4595#4595: *9 http header: "Host: dev.mysite.com"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http header: "Connection: keep-alive"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http header: "Upgrade-Insecure-Requests: 1"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http header: "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http header: "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http header: "Accept-Encoding: gzip, deflate"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http header: "Accept-Language: nl,en-GB;q=0.9,en;q=0.8,en-US;q=0.7"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http header: "Cookie: _ga=GA1.3.720794213.1619611920; DNT=1; _gid=GA1.2.828244150.1620026173; PHPSESSID=n74s4gapr0p0ndtembl29trf6i; visitedPages=11; FWPC=[29736,27375]; _gaexp=GAX1.2.2dXV0C9fTWC3UynXzlip_g.18836.1; _ga_8W7DFSB6FH=GS1.1.1620122083.3.0.1620122083.0; _ga_1THC28GH3W=GS1.1.1620188652.8.1.1620188896.0; _ga=GA1.2.1980844308.1619768032"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http header done
2021/05/05 09:35:56 [debug] 4595#4595: *9 event timer del: 15: 2476615
2021/05/05 09:35:56 [debug] 4595#4595: *9 generic phase: 0
2021/05/05 09:35:56 [debug] 4595#4595: *9 rewrite phase: 1
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script complex value
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "/home/vagrant/code/www/web/wp-json/mynamespace/v2"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: ""
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script file op 0000000000000005 "/home/vagrant/code/www/web/wp-json/mynamespace/v2"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script if
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script value: "1"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script set $wp_multisite
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "1"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script value: "1"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script equal
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script if
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script regex: "^/[_0-9a-zA-Z-]+(/wp-.*)"
2021/05/05 09:35:56 [notice] 4595#4595: *9 "^/[_0-9a-zA-Z-]+(/wp-.*)" does not match "/wp-json/mynamespace/v2", client: 192.168.100.1, server: dev.mysite.com, request: "GET /wp-json/mynamespace/v2 HTTP/1.1", host: "dev.mysite.com"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script regex: "^/[_0-9a-zA-Z-]+.*(/wp-admin/.*\.php)$"
2021/05/05 09:35:56 [notice] 4595#4595: *9 "^/[_0-9a-zA-Z-]+.*(/wp-admin/.*\.php)$" does not match "/wp-json/mynamespace/v2", client: 192.168.100.1, server: dev.mysite.com, request: "GET /wp-json/mynamespace/v2 HTTP/1.1", host: "dev.mysite.com"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script regex: "^/[_0-9a-zA-Z-]+(/.*\.php)$"
2021/05/05 09:35:56 [notice] 4595#4595: *9 "^/[_0-9a-zA-Z-]+(/.*\.php)$" does not match "/wp-json/mynamespace/v2", client: 192.168.100.1, server: dev.mysite.com, request: "GET /wp-json/mynamespace/v2 HTTP/1.1", host: "dev.mysite.com"
2021/05/05 09:35:56 [debug] 4595#4595: *9 test location: "/"
2021/05/05 09:35:56 [debug] 4595#4595: *9 test location: "robots.txt"
2021/05/05 09:35:56 [debug] 4595#4595: *9 test location: "wp-json/mynamespace/v2"
2021/05/05 09:35:56 [debug] 4595#4595: *9 using configuration "/wp-json/mynamespace/v2"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http cl:-1 max:104857600
2021/05/05 09:35:56 [debug] 4595#4595: *9 rewrite phase: 3
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script regex: "^/wp-json/mynamespace/v2/?(.*)$"
2021/05/05 09:35:56 [notice] 4595#4595: *9 "^/wp-json/mynamespace/v2/?(.*)$" matches "/wp-json/mynamespace/v2", client: 192.168.100.1, server: dev.mysite.com, request: "GET /wp-json/mynamespace/v2 HTTP/1.1", host: "dev.mysite.com"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "/wp-json/mynamespace/v2/public/dev.mysite.com"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script regex end
2021/05/05 09:35:56 [notice] 4595#4595: *9 rewritten data: "/wp-json/mynamespace/v2/public/dev.mysite.com", args: "", client: 192.168.100.1, server: dev.mysite.com, request: "GET /wp-json/mynamespace/v2 HTTP/1.1", host: "dev.mysite.com"
2021/05/05 09:35:56 [debug] 4595#4595: *9 post rewrite phase: 4
2021/05/05 09:35:56 [debug] 4595#4595: *9 uri changes: 11
2021/05/05 09:35:56 [debug] 4595#4595: *9 test location: "/"
2021/05/05 09:35:56 [debug] 4595#4595: *9 test location: "robots.txt"
2021/05/05 09:35:56 [debug] 4595#4595: *9 test location: "wp-json/mynamespace/v2"
2021/05/05 09:35:56 [debug] 4595#4595: *9 test location: "/public"
2021/05/05 09:35:56 [debug] 4595#4595: *9 test location: ~ "\.php(/|$)"
2021/05/05 09:35:56 [debug] 4595#4595: *9 using configuration "/wp-json/mynamespace/v2/public"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http cl:-1 max:104857600
2021/05/05 09:35:56 [debug] 4595#4595: *9 rewrite phase: 3
2021/05/05 09:35:56 [debug] 4595#4595: *9 post rewrite phase: 4
2021/05/05 09:35:56 [debug] 4595#4595: *9 generic phase: 5
2021/05/05 09:35:56 [debug] 4595#4595: *9 generic phase: 6
2021/05/05 09:35:56 [debug] 4595#4595: *9 generic phase: 7
2021/05/05 09:35:56 [debug] 4595#4595: *9 access phase: 8
2021/05/05 09:35:56 [debug] 4595#4595: *9 access phase: 9
2021/05/05 09:35:56 [debug] 4595#4595: *9 access phase: 10
2021/05/05 09:35:56 [debug] 4595#4595: *9 post access phase: 11
2021/05/05 09:35:56 [debug] 4595#4595: *9 generic phase: 12
2021/05/05 09:35:56 [debug] 4595#4595: *9 try files handler
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "/wp-json/mynamespace/v2/public/dev.mysite.com"
2021/05/05 09:35:56 [debug] 4595#4595: *9 trying to use file: "/wp-json/mynamespace/v2/public/dev.mysite.com" "/home/vagrant/code/www-new/web/wp-json/mynamespace/v2/public/dev.mysite.com"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "/wp-json/mynamespace/v2/public/dev.mysite.com"
2021/05/05 09:35:56 [debug] 4595#4595: *9 trying to use dir: "/wp-json/mynamespace/v2/public/dev.mysite.com" "/home/vagrant/code/www-new/web/wp-json/mynamespace/v2/public/dev.mysite.com"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "/index.php"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: ""
|||2021/05/05 09:35:56 [debug] 4595#4595: *9 trying to use file: "/index.php" "/home/vagrant/code/www-new/web/index.php"
|||2021/05/05 09:35:56 [debug] 4595#4595: *9 internal redirect: "/index.php?"
2021/05/05 09:35:56 [debug] 4595#4595: *9 rewrite phase: 1
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script complex value
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "/home/vagrant/code/www/web/index.php"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: ""
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script file op 0000000000000005 "/home/vagrant/code/www/web/index.php"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script file op false
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script if
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script if: false
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "1"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script value: "1"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script equal
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script if
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script regex: "^/[_0-9a-zA-Z-]+(/wp-.*)"
2021/05/05 09:35:56 [notice] 4595#4595: *9 "^/[_0-9a-zA-Z-]+(/wp-.*)" does not match "/index.php", client: 192.168.100.1, server: dev.mysite.com, request: "GET /wp-json/mynamespace/v2 HTTP/1.1", host: "dev.mysite.com"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script regex: "^/[_0-9a-zA-Z-]+.*(/wp-admin/.*\.php)$"
2021/05/05 09:35:56 [notice] 4595#4595: *9 "^/[_0-9a-zA-Z-]+.*(/wp-admin/.*\.php)$" does not match "/index.php", client: 192.168.100.1, server: dev.mysite.com, request: "GET /wp-json/mynamespace/v2 HTTP/1.1", host: "dev.mysite.com"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script regex: "^/[_0-9a-zA-Z-]+(/.*\.php)$"
2021/05/05 09:35:56 [notice] 4595#4595: *9 "^/[_0-9a-zA-Z-]+(/.*\.php)$" does not match "/index.php", client: 192.168.100.1, server: dev.mysite.com, request: "GET /wp-json/mynamespace/v2 HTTP/1.1", host: "dev.mysite.com"
2021/05/05 09:35:56 [debug] 4595#4595: *9 test location: "/"
2021/05/05 09:35:56 [debug] 4595#4595: *9 test location: "robots.txt"
2021/05/05 09:35:56 [debug] 4595#4595: *9 test location: "favicon.ico"
2021/05/05 09:35:56 [debug] 4595#4595: *9 test location: ~ "^/(vacature)/"
2021/05/05 09:35:56 [debug] 4595#4595: *9 test location: ~ "\.php$"
2021/05/05 09:35:56 [debug] 4595#4595: *9 using configuration "\.php$"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http cl:-1 max:104857600
2021/05/05 09:35:56 [debug] 4595#4595: *9 rewrite phase: 3
2021/05/05 09:35:56 [debug] 4595#4595: *9 post rewrite phase: 4
2021/05/05 09:35:56 [debug] 4595#4595: *9 generic phase: 5
2021/05/05 09:35:56 [debug] 4595#4595: *9 generic phase: 6
2021/05/05 09:35:56 [debug] 4595#4595: *9 generic phase: 7
2021/05/05 09:35:56 [debug] 4595#4595: *9 access phase: 8
2021/05/05 09:35:56 [debug] 4595#4595: *9 access phase: 9
2021/05/05 09:35:56 [debug] 4595#4595: *9 access phase: 10
2021/05/05 09:35:56 [debug] 4595#4595: *9 post access phase: 11
2021/05/05 09:35:56 [debug] 4595#4595: *9 generic phase: 12
2021/05/05 09:35:56 [debug] 4595#4595: *9 generic phase: 13
2021/05/05 09:35:56 [debug] 4595#4595: *9 http init upstream, client timer: 0
2021/05/05 09:35:56 [debug] 4595#4595: *9 epoll add event: fd:15 op:3 ev:80002005
2021/05/05 09:35:56 [debug] 4595#4595: *9 posix_memalign: 0000563F920B59D0:4096 @16
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "QUERY_STRING"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: ""
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "QUERY_STRING: "
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "REQUEST_METHOD"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "GET"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "REQUEST_METHOD: GET"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "CONTENT_TYPE"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "CONTENT_TYPE: "
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "CONTENT_LENGTH"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "CONTENT_LENGTH: "
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "SCRIPT_NAME"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "/index.php"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "SCRIPT_NAME: /index.php"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "REQUEST_URI"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "/wp-json/mynamespace/v2"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "REQUEST_URI: /wp-json/mynamespace/v2"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "DOCUMENT_URI"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "/index.php"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "DOCUMENT_URI: /index.php"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "DOCUMENT_ROOT"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "/home/vagrant/code/www/web"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "DOCUMENT_ROOT: /home/vagrant/code/www/web"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "SERVER_PROTOCOL"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "HTTP/1.1"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "SERVER_PROTOCOL: HTTP/1.1"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "REQUEST_SCHEME"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "http"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "REQUEST_SCHEME: http"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: ""
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "GATEWAY_INTERFACE"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "CGI/1.1"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "GATEWAY_INTERFACE: CGI/1.1"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "SERVER_SOFTWARE"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "nginx/"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "1.18.0"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "SERVER_SOFTWARE: nginx/1.18.0"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "REMOTE_ADDR"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "192.168.100.1"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "REMOTE_ADDR: 192.168.100.1"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "REMOTE_PORT"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "50022"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "REMOTE_PORT: 50022"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "SERVER_ADDR"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "192.168.100.100"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "SERVER_ADDR: 192.168.100.100"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "SERVER_PORT"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "80"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "SERVER_PORT: 80"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "SERVER_NAME"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "dev.mysite.com"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "SERVER_NAME: dev.mysite.com"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "REDIRECT_STATUS"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "200"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "REDIRECT_STATUS: 200"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script copy: "SCRIPT_FILENAME"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "/home/vagrant/code/www/web"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http script var: "/index.php"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "SCRIPT_FILENAME: /home/vagrant/code/www/web/index.php"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "HTTP_HOST: dev.mysite.com"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "HTTP_CONNECTION: keep-alive"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "HTTP_UPGRADE_INSECURE_REQUESTS: 1"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "HTTP_ACCEPT_ENCODING: gzip, deflate"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "HTTP_ACCEPT_LANGUAGE: nl,en-GB;q=0.9,en;q=0.8,en-US;q=0.7"
2021/05/05 09:35:56 [debug] 4595#4595: *9 fastcgi param: "HTTP_COOKIE: _ga=GA1.3.720794213.1619611920; DNT=1; _gid=GA1.2.828244150.1620026173; PHPSESSID=n74s4gapr0p0ndtembl29trf6i; visitedPages=11; FWPC=[29736,27375]; _gaexp=GAX1.2.2dXV0C9fTWC3UynXzlip_g.18836.1; _ga_8W7DFSB6FH=GS1.1.1620122083.3.0.1620122083.0; _ga_1THC28GH3W=GS1.1.1620188652.8.1.1620188896.0; _ga=GA1.2.1980844308.1619768032"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http cleanup add: 0000563F920486A0
2021/05/05 09:35:56 [debug] 4595#4595: *9 get rr peer, try: 1
2021/05/05 09:35:56 [debug] 4595#4595: *9 stream socket 17
2021/05/05 09:35:56 [debug] 4595#4595: *9 epoll add connection: fd:17 ev:80002005
2021/05/05 09:35:56 [debug] 4595#4595: *9 connect to unix:/var/run/php/php7.4-fpm.sock, fd:17 #12
2021/05/05 09:35:56 [debug] 4595#4595: *9 connected
2021/05/05 09:35:56 [debug] 4595#4595: *9 http upstream connect: 0
2021/05/05 09:35:56 [debug] 4595#4595: *9 posix_memalign: 0000563F92045F00:128 @16
2021/05/05 09:35:56 [debug] 4595#4595: *9 http upstream send request
2021/05/05 09:35:56 [debug] 4595#4595: *9 http upstream send request body
2021/05/05 09:35:56 [debug] 4595#4595: *9 chain writer buf fl:0 s:1336
2021/05/05 09:35:56 [debug] 4595#4595: *9 chain writer in: 0000563F920486E0
2021/05/05 09:35:56 [debug] 4595#4595: *9 writev: 1336 of 1336
2021/05/05 09:35:56 [debug] 4595#4595: *9 chain writer out: 0000000000000000
2021/05/05 09:35:56 [debug] 4595#4595: *9 event timer add: 17: 300000:2716619
2021/05/05 09:35:56 [debug] 4595#4595: *9 http finalize request: -4, "/index.php?" a:1, c:3
2021/05/05 09:35:56 [debug] 4595#4595: *9 http request count:3 blk:0
2021/05/05 09:35:56 [debug] 4595#4595: *9 http finalize request: -4, "/index.php?" a:1, c:2
2021/05/05 09:35:56 [debug] 4595#4595: *9 http request count:2 blk:0
2021/05/05 09:35:56 [debug] 4595#4595: *9 http run request: "/index.php?"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http upstream check client, write event:1, "/index.php"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http upstream request: "/index.php?"
2021/05/05 09:35:56 [debug] 4595#4595: *9 http upstream dummy handler
2021/05/05 09:35:59 [debug] 4595#4595: *9 http upstream request: "/index.php?"
2021/05/05 09:35:59 [debug] 4595#4595: *9 http upstream process header
2021/05/05 09:35:59 [debug] 4595#4595: *9 malloc: 0000563F920B69E0:16384
2021/05/05 09:35:59 [debug] 4595#4595: *9 recv: eof:1, avail:-1
2021/05/05 09:35:59 [debug] 4595#4595: *9 recv: fd:17 672 of 16384
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi record byte: 01
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi record byte: 06
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi record byte: 00
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi record byte: 01
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi record byte: 02
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi record byte: 87
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi record byte: 01
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi record byte: 00
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi record length: 647
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi parser: 0
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi header: "Status: 404 Not Found"
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi parser: 0
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi header: "Expires: Thu, 19 Nov 1981 08:52:00 GMT"
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi parser: 0
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi header: "Cache-Control: no-store, no-cache, must-revalidate"
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi parser: 0
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi header: "Pragma: no-cache"
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi parser: 0
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi header: "Content-Type: application/json; charset=UTF-8"
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi parser: 0
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi header: "X-Robots-Tag: noindex"
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi parser: 0
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi header: "Link: <https://dev.mysite.com/wp-json/>; rel="https://api.w.org/""
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi parser: 0
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi header: "X-Content-Type-Options: nosniff"
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi parser: 0
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi header: "Access-Control-Expose-Headers: X-WP-Total, X-WP-TotalPages"
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi parser: 0
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi header: "Access-Control-Allow-Headers: Authorization, Content-Type"
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi parser: 0
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi header: "Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE"
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi parser: 0
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi header: "Access-Control-Allow-Credentials: true"
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi parser: 1
2021/05/05 09:35:59 [debug] 4595#4595: *9 http fastcgi header done
2021/05/05 09:35:59 [debug] 4595#4595: *9 xslt filter header
2021/05/05 09:35:59 [debug] 4595#4595: *9 HTTP/1.1 404 Not Found
Server: nginx/1.18.0 (Ubuntu)
Date: Wed, 05 May 2021 09:35:59 GMT
Content-Type: application/json; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-Robots-Tag: noindex
Link: <https://dev.mysite.com/wp-json/>; rel="https://api.w.org/"
X-Content-Type-Options: nosniff
Access-Control-Expose-Headers: X-WP-Total, X-WP-TotalPages
Access-Control-Allow-Headers: Authorization, Content-Type
Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE
Access-Control-Allow-Credentials: true