Welcome! Log In Create A New Profile

Advanced

Re: Wordpress Multi-Site Converting Apache to Nginx

May 01, 2014 02:07AM
Ok, at this point I have removed everything from the config just to try and get the most basic thing working.

This is the entire config now:

location ^~ /wordpress/ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
}

location / {
return 403;
}

That's all the location blocks.

What happens:
1. Going to any page that does not start with /wordpress/ produces a 403. This is correct according to my understating of the config.

2. Going to any url starting with /wordpress/ like /wordpress/wp-admin/ or even just /wordpress/ itself, produces a blank page.

> Is your blank page a http 200 with no content, or a http 200 with some
> content that the browser shows as blank, or some other http response?

The blank page is a response code 200, with proper headers, but no body HTML at all. View page source is empty.

> curl -v http://whatever/wp-admin/

Here is the output:

MyDomain is used in place of real domain.

* Adding handle: conn: 0x18f5b00
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x18f5b00) send_pipe: 1, recv_pipe: 0
* About to connect() to www.MyDomain.com port 443 (#0)
* Trying xx.xxx.xxx.xxx...
* Connected to www.MyDomain.com (xx.xxx.xxx.xxx) port 443 (#0)
> GET /wordpress/ HTTP/1.1
> User-Agent: curl/7.32.0
> Host: www.MyDomain.com
> Accept: */*
>
< HTTP/1.1 200 OK
* Server nginx is not blacklisted
< Server: nginx
< Date: Thu, 01 May 2014 05:55:32 GMT
< Content-Type: text/html; charset=UTF-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Powered-By: PHP/5.5.9-1ubuntu4
<
* Connection #0 to host www.domain.com left intact



> The logs will show which location is used. Can you see which
> file-on-the-filesystem is returned?

For the request /wordpress/ with above simple config, it matches the /wordpress/ location and passes it to fastcgi:
the log says: http upstream request: "/wordpress/?"
then: http fastcgi record length: 61
which seems a bit short. So PHP is returning nothing?
Subject Author Posted

Wordpress Multi-Site Converting Apache to Nginx

nrahl April 29, 2014 04:27PM

Re: Wordpress Multi-Site Converting Apache to Nginx

Francis Daly April 29, 2014 06:42PM

Re: Wordpress Multi-Site Converting Apache to Nginx

nrahl April 30, 2014 02:46AM

Re: Wordpress Multi-Site Converting Apache to Nginx

Francis Daly April 30, 2014 03:16AM

Re: Wordpress Multi-Site Converting Apache to Nginx

nrahl May 01, 2014 02:07AM

Re: Wordpress Multi-Site Converting Apache to Nginx

GreenGecko May 01, 2014 02:28AM

Re: Wordpress Multi-Site Converting Apache to Nginx

nrahl May 01, 2014 03:02AM

Re: Wordpress Multi-Site Converting Apache to Nginx

Alan Chandler May 08, 2014 03:32PM

Re: Wordpress Multi-Site Converting Apache to Nginx

Francis Daly May 01, 2014 02:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 311
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready