2

I'm trying to serve some services as a subdomain but it looks like nginx is not doing it right. I have 3 docker containers serving zabbix, webmin and mediawiki.

  • example.com/zabbix (works fine)
  • example.com/webmin (not rendering)
  • example.com/wiki (not rendering)
server {
    listen 80;
    server_name             example.com;
    root                    /var/www/html/;
    

    location /zabbix {
        proxy_pass          http://192.168.0.71:8081;
        proxy_set_header    Host                $host;
        proxy_set_header    X-Real-IP           $remote_addr;
        proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
    }

    location /wiki {
        proxy_pass         http://192.168.0.71:8080;
        proxy_set_header   Host                 $host;
        proxy_set_header   X-Real-IP            $remote_addr;
        proxy_set_header   X-Forwarded-For      $proxy_add_x_forwarded_for;
    }
    location /webmin {
        proxy_pass         http://192.168.0.71:10000;
        proxy_set_header   Host                 $host;
        proxy_set_header   X-Real-IP            $remote_addr;
        proxy_set_header   X-Forwarded-For      $proxy_add_x_forwarded_for;
    }

}

Also add in /etc/webmin/config:

webprefix=/webmin
webprefixnoredir=1

and LocalSettings.php

$wgServer = "http://example.com";
$wgArticlePath = "/wiki/$1";
$wgUsePathInfo = true;

wiki pages and webmin looks weird: wiki screenshot

Any help will be appreciated thanks!

gadalf_182
  • 21
  • 1
  • I am surprised that *MediaWiki* works at all. As to the absence of styles, it seems that `index.php` is served but `load.php` is not. However, without the relevant nginx configuration from the container running MediaWiki little can be done to help you. – Alexander Mashin Oct 03 '20 at 21:21
  • thanks you, mediawiki is served by apache in its container... what file would you like to see? – gadalf_182 Oct 04 '20 at 19:33
  • Unfortunately, I havent' worked with Apache for many years. However, I recomment that you publish here all relevant config files, including `.htaccess`. Meanwhile, in browser Developer tools look all requests to `load.php` (there will be a few) and what is the response to them. – Alexander Mashin Oct 05 '20 at 12:10

0 Answers0