NGINX Server block when MediaWiki in subdirectory
NickName:LPH Ask DateTime:2013-12-18T11:06:45

NGINX Server block when MediaWiki in subdirectory

MediaWiki installation was in domain.com/subdirectory and worked with Apache as the server.

Pages were found domain.com/subdirectory/index.php/Main_Page

The server was changed to NGINX the other night. WordPress and XenForo work fine but the location block for MediaWiki isn't working properly.

Since I'm new to NGINX and the configuration file inner workings, I'm not sure how to write the location block to get the results equal to the Apache page layout (index.php shows).

This is my latest attempt (failed, of course).

 #MEDIAWIKI
 location /subdirectory/ {
     try_files $uri $uri /index.php?query_string;
 }

This writes to domain.com/subdirectory/title and the index.php is missing.

The documents show writing to a subdomain and this is not what I'm wanting. The index.php also needs to remain.

Thank you for providing as much information so this is solved. For example, I'm not sure if LocalSettings needs modification.

Copyright Notice:Content Author:「LPH」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/20648979/nginx-server-block-when-mediawiki-in-subdirectory

More about “NGINX Server block when MediaWiki in subdirectory” related questions

NGINX Server block when MediaWiki in subdirectory

MediaWiki installation was in domain.com/subdirectory and worked with Apache as the server. Pages were found domain.com/subdirectory/index.php/Main_Page The server was changed to NGINX the other...

Show Detail

MediaWiki installed with nginx reverse proxy configuration

I would like to install MediaWiki in such a way. Download and extract all the MediaWiki installation files to a location where wiki.gaobo.org nginx server block points to; Set up a reverse proxy

Show Detail

Mediawiki nginx 500 internal server error

I'm trying to set up mediawiki and I keep getting a 500 internal server error. /var/log/nginx/error.log is empty. PHP errors are logged there, but I don't see any errors relating to mediawiki. I've

Show Detail

Mediawiki Subdirectory Installation

Possible Duplicate: MediaWiki on SubDirectory and SubDomain (However doesn't have an answer, nor any replies offering help) Alright, I'm trying to configure MediaWiki to be installed to a sub-dire...

Show Detail

nginx ignore extension location for subdirectory

I have a nginx block for a wordpress installation, and a subdirectory which redirects to an app I have running. I want .php urls that go to the subdirectory to not be evaluated by fastcgi, since th...

Show Detail

Rewrite root address to a subdirectory in nginx

I'm converting my mediawiki site to use nginx as a frontend for static files with apache on the backend for php. I've gotten everything working so far except for when I view the root directory "exa...

Show Detail

Nginx subdirectory root with PHP

I'm running nginx in a docker container. I want to have a subdirectory /web/ to access my personal files and projects. It should also support php. Below is what I'm running with but domain-a.com/web

Show Detail

Nginx with subdirectory

I'm trying to get the following configuration to work inside a subdirectory /dev but I'm quite new to Nginx and can't seem to get it to work properly. If you look at the below configuration, you'...

Show Detail

Wordpress in subdirectory nginx

Hi I have an Nginx Server with running wp's with no problem. I just created a site in blank html5 and added some functions with php. Then my client decided to have a blog too. So i installed Wordpr...

Show Detail

MediaWiki on Nginx

I can't get MediaWiki to work on Nginx. I have it in my /var/www/domain.com/htdocs/wiki dir and in my wiki.domain.com subdomain. I tried with many vhost examples found over the internet, for insta...

Show Detail