kristophjunge / docker-mediawiki

Dockerized MediaWiki running under Nginx and PHP-FPM. Based on the official PHP7 image. Packaged with VisualEditor plugin and Parsoid service.
MIT License
62 stars 41 forks source link

How to use different context url ? #25

Open CondormanFr opened 5 years ago

CondormanFr commented 5 years ago

Thank you very munch for this project that is really easy to setup. But in my case, I have an issue because I 'm replacing an existing instance of mediawiki and this one was accessible with an url of kind http://www.domain.com/wiki I installed it on a server who give access to many application so I have an nginx reverse proxy in front of your project with configuration like :

    location /wiki/ {
            proxy_pass http://mediawiki-wiki:8080/;

    }  

But it does not work because with the nginx from your mediawiki setup. I get many redirection.

I tried many things by changing MEDIAWIKI_SERVER value or adding $wgArticlePath = '/wiki/$1'; but none works.

How to solve my issue and be able to use your project behind an nginx proxy with a context url : /wiki ?

Thanks a lot.

d8sychain commented 5 years ago

I'd say your issue is the rewrite configured in /etc/nginx/nginx.conf for using Short URLs https://m.mediawiki.org/wiki/Manual:Short_URL. If you write your own nginx.conf you can use 'docker cp' to copy it into the container.