Running Webmin under Apache

What is the output of [cmd=]grep PROXY /var/db/ports/apache22/options[/cmd] and [cmd=]ls /usr/local/libexec/apache22/*proxy*[/cmd]?
 
grep PROXY /var/db/ports/apache22/options:

Code:
WITH_PROXY=true
WITHOUT_PROXY_CONNECT=true
WITH_PATCH_PROXY_CONNECT=true
WITHOUT_PROXY_FTP=true
WITHOUT_PROXY_HTTP=true
WITHOUT_PROXY_AJP=true
WITHOUT_PROXY_BALANCER=true

ls /usr/local/libexec/apache22/*proxy*:
Code:
/usr/local/libexec/apache22/mod_proxy.so        /usr/local/libexec/apache22/mod_proxy_html.so
 
That got mod_proxy installed, thanks DutchDaemon!

I have added the following to httpd.conf:

Code:
ProxyPass /webmin/ http://www.mydomain.com:10000/
ProxyPassReverse /webmin/ http://www.mydomain.com:10000/
<Proxy *>
allow from all
</Proxy>

But when I try to browse:

http://www.mydomain.com/webmin

I get a 404.

I also edited the following file (as per Webmins instructions on the website):

Code:
/usr/local/lib/webmin/config

and added:
Code:
webprefix=/webmin
webprefixnoredir=1
referer=www.mydomain.com

Why am I getting a 404 when I can browse http://www.mydomain.com:10000 perfectly for webmin?

Surely mod_proxy is just forwarding the request from http://www.mydomain.com/webmin to http://www.mydomain.com:10000
 
This is interesting, if I try to browse:

http://www.mydomain.com/webmin/ (note slash after webmin)

then I get this:

Code:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@mydomain.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

but if I browse:

http://www.bsdpanic.com/webmin

I get the 404
 
In the logfile:

/var/log/httpd-error.log

it says:

Code:
[Fri Jul 24 17:16:11 2009] [warn] proxy:
No protocol handler was valid for the URL /webmin/. If you are using a DSO version of mod_proxy,
make sure the proxy submodules are included in the configuration using LoadModule.
 
It works!

After much frustration I ended up rebuilding my server. I managed to get webmin to work as a subdirectory under Apache via mod_proxy in minutes!

Heres my config in case anyone else has problems with this:

Code:
/usr/local/etc/webmin/config:

webprefix=/webmin
webprefixnoredir=1
referer=localhost

/usr/local/etc/apache22/httpd.conf:


ProxyPass /webmin/ http://www.mydomain.com:10000/
ProxyPassReverse /webmin/ http://www.mydomain.com:10000/

<Proxy *>
allow from all
SSLRequireSSL (optional but I recommend SSL!)
</Proxy>

I also made sure when I installed the Apache port that I selected mod_proxy, mod_proxy_connect, mod_proxy_ftp mod_proxy_http, mod_proxy_ajp and mod_proxy_balancer. I'm not sure if ALL these are needed but I installed them anyway.

Thanks to everyone for their help with this...:e
 
Back
Top