Welcome! Log In Create A New Profile

Advanced

problems with mediawiki behind nginx / apache (redirects to wrong url)

Gelonida N
September 11, 2011 02:16PM
Hi,

I'm having a little trouble to get Mediawiki working in my nginx setup.

The problem is very probably the configuration of Mediawiki, but the
Help pages about Mediawiki don't mention nginx.
So I thought I ask here.


My Problem:
- I setup nginx with https such, that it handles all files, except php
files, which fill be proxied to apache/mod_php at port 8081

- I installed a new Mediawiki

- the installation via the web worked fine and was confirmed
with a success message

- then I moved config/LocalSedttings.php to the wiki directory

Now I access https:/servername/wiki2/
and get redirected to http://servername:8081/wiki2/index.php/Main_Page


Below my nginx configuration:


# ============== nginx configuration ========
server {
listen 443 ssl;
ssl_session_timeout 10m;
ssl_session_cache shared:SSL:10m;

location ~ \.(php)$ {
include proxy.conf;
proxy_pass http://127.0.0.1:8081;
}

# nginx shall serve all files except the php ones
location / {
root /my/doc/root;
index index.html index.htm index.php;
}

# ==================== proxy.conf ==============
proxy_redirect off;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

client_max_body_size 10m;
client_body_buffer_size 128k;

proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;

proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;


Thanks in advance for any pointers.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

problems with mediawiki behind nginx / apache (redirects to wrong url)

Gelonida N September 11, 2011 02:16PM

Re: problems with mediawiki behind nginx / apache (redirects to wrong url)

Gelonida N September 11, 2011 02:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 167
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