[TriLUG] Help with proxy setup

Igor Partola igor at igorpartola.com
Tue Dec 3 16:50:10 EST 2013


Ah, that makes sense. Look at http://wiki.nginx.org/HttpCoreModule#.24uri.
The $uri variable does not include the query part, so it would strip off
the ?page_id=317. Take a look at $request_uri instead (
http://wiki.nginx.org/HttpCoreModule#.24request_uri). Alternatively, just
set it like so:

    proxy_pass http://$host;

Note that this is somewhat of a security vulnerability as I could make
requests to port 80 on any machine on your network, not just your WordPress
servers. After all, the $host variable is specified in the request by the
user, so it can be forged. It might be a good idea to restrict your
"server_name" variable and create a second vhost as a catch-all for any
domains you did not intend to support.

Igor


More information about the TriLUG mailing list