Results 1 to 10 of 10

Thread: access webmin as a subdomain

  1. #1
    Join Date
    Feb 2010
    Beans
    7

    access webmin as a subdomain

    Hello, I am using webmin pannel as a way to administer my box and works really good. I am able to access it great from any external IP out side of the home network but not able to from work. I assume it has to do with the firewall that we have here.

    So what I am trying to do is to use webmin as a subdomain on port 80 like any other website that I have on my box uses.

    I found a site from google that explains how to do this but I get an error when restarting apache. I dont have very much experiance with apache to know what this is refering to.

    Here is the steps that i took.

    $ sudo a2enmod proxy
    Create a configuration file at /etc/apache2/sites-available/webmin and paste the following code in:
    <IfModule mod_proxy.c><VirtualHost *:80> # Don't forget to customise the following line to your actual subdomain: ServerName webmin.example.com # The following URLs are for your Webmin server. If Webmin is on a different machine, change these: ProxyPass / http://localhost:10000/ ProxyPassReverse / http://localhost:10000/ <Proxy *> Order Allow,Deny Allow from all </Proxy></VirtualHost></IfModule>
    Then, enable the Virtual Host configuration you have just created:
    $ sudo a2ensite webmin
    Now restart Apache:
    $ sudo invoke-rc.d apache2 restart Now when I go to restart the apache server I get this error message.brent@kcpcrepair:~$ sudo invoke-rc.d apache2 restart
    [sudo] password for brent:
    * Restarting web server apache2 [Thu Jun 10 12:54:06 2010] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    ... waiting [Thu Jun 10 12:54:07 2010] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results

  2. #2
    Join Date
    Apr 2009
    Location
    Saitama, Japan
    Beans
    132
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: access webmin as a subdomain

    I, too, would like to access webmin using a subdomain. I have tried the above suggestion but when I access the link I get a 500 internal error.

    I have webmin setup using ssl connection and this may be my problem but I don't know how to remedy it.

    Here is my virtual host file.

    Code:
    <IfModule mod_proxy.c>
    <VirtualHost *:80>
    ServerName sub.domain.com
    ProxyPass / https://localIP:10000/
    ProxyPassReverse / https://localIP:10000/
    
     <Proxy *>
       Order Allow,Deny
       Allow from all
     </Proxy>
    
      </VirtualHost>
     </IfModule>

  3. #3
    James78's Avatar
    James78 is offline Extra Foam Sugar Free Ubuntu
    Join Date
    Sep 2008
    Beans
    Hidden!

    Re: access webmin as a subdomain

    I'm guessing the order allow,deny stuff is what's giving you the 500 internal error.

    Remove the <Proxy *> block. Does it work fine after? It's probably related to that then. Try this afterward (notice the case):
    Code:
    <Proxy *>
      Order allow,deny
      allow from all
    </Proxy>
    Does it still not work? Still a 500 internal server error? It might be related to webmin. Check the apache and webmin error logs, they might state something useful.
    Last edited by James78; December 30th, 2010 at 03:57 AM.

  4. #4
    Join Date
    Apr 2009
    Location
    Saitama, Japan
    Beans
    132
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: access webmin as a subdomain

    james78,

    Thanks for your reply. I've deleted the code suggested and I get a 'Forbidden-You don't have permission to access / on this server' error.

    I've tried your code (lower case) and I get the internal error once again.

  5. #5
    James78's Avatar
    James78 is offline Extra Foam Sugar Free Ubuntu
    Join Date
    Sep 2008
    Beans
    Hidden!

    Re: access webmin as a subdomain

    It's probably Webmin. Check /var/log/apache2/error.log and /var/webmin/miniserv.error

    If you find any errors regarding this in there, please post the related part(s).

    From this thread, I've gathered you might need to do something in Webmin. Try ...
    ... you need one IP address dedicated to Webmin. In the Webmin Ports and Addresses page, you can set which address Webmin listens on. Make it the IP of "panel.example.com", and put no virtual servers on this IP address.
    Last edited by James78; December 30th, 2010 at 04:31 AM.

  6. #6
    Join Date
    Apr 2009
    Location
    Saitama, Japan
    Beans
    132
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: access webmin as a subdomain

    I see no log pertaining to my issue in the miniserv.error. In the apache erorr.log, I see this.

    [Thu Dec 30 12:35:09 2010] [error] [client 192.168.1.1] client denied by server configuration: proxy:http://192.168.1.135:10000/favicon.ico, referer: http://sub.domain.com/
    [Thu Dec 30 12:35:10 2010] [error] [client 192.168.1.1] client denied by server configuration: proxy:http://192.168.1.135:10000/
    [Thu Dec 30 12:35:10 2010] [error] [client 192.168.1.1] client denied by server configuration: proxy:http://192.168.1.135:10000/favicon.ico, referer: http://sub.domain.com/

  7. #7
    James78's Avatar
    James78 is offline Extra Foam Sugar Free Ubuntu
    Join Date
    Sep 2008
    Beans
    Hidden!

    Re: access webmin as a subdomain

    Can you go to Webmin Configuration -> Webmin Ports and Addresses, and set which address Webmin listens on to the IP of your sub.domain.com? Also, for some reason they said not to put any virtual servers on this IP address.

  8. #8
    Join Date
    Apr 2009
    Location
    Saitama, Japan
    Beans
    132
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: access webmin as a subdomain

    I am confused at this point. That quote is asking for a static ip I don't have.
    My ip is dynamic. If I set that ip address to the subdomain it is on, when it changes, it will not resolve to the new ip, correct?

  9. #9
    James78's Avatar
    James78 is offline Extra Foam Sugar Free Ubuntu
    Join Date
    Sep 2008
    Beans
    Hidden!

    Re: access webmin as a subdomain

    Correct. There are ways to get around this however. You could use a service like NoIP or DynDNS. They provide a static IP which redirects all traffic to your IP. You install a client program on your computer which continurally updates the IP they point to. For a basic thing like this, you won't have to pay anything (free).

  10. #10
    Join Date
    Feb 2007
    Beans
    1

    Re: access webmin as a subdomain

    Hi guys,

    I was stuck on the same problem, and it's now FIXED for me.

    In the available Apache's modules, there's more than "proxy". Enabling proxy_http fixed the problem for me

    Code:
    a2enmode proxy_http
    Hope that helps!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •