I would like to install MediaWiki in such a way.
Questions:
This is certainly doable (although from a generic usability and information security point of view having different things on different domains is usually better). Probably the easiest way to do it is to not expose the MediaWiki server directly to the web, install MediaWiki under /wiki and tell it (via $wgServer
) that it is running on gao.bo. That way the proxy does not have to deal with URL rewrites, cookie path rewrites, different domain names etc.
To set that up, you would set something like
location /wiki/ {
proxy_pass http://<IP of your MediaWiki server>;
}
for the proxy nginx, and make sure the wiki server routes requests for /wiki/
to the MediaWiki installation. Then you can just run the installer via the proxy, as you described, and add the IP of the proxy to $wgSquidServers
so that MediaWiki trusts X-Forwarded-For
headers.