IspConfig 3.1.x Webinterface at subdomain on port 443

Discussion in 'Tips/Tricks/Mods' started by Pappmann, Mar 1, 2017.

  1. Pappmann

    Pappmann New Member

    Is there any working solution to use IspConfig 3.1x Webinterface on port 443 via subdomain?

    I´m using IspConfig on a debian 8 server.
     
  2. ahrasis

    ahrasis Active Member

    Did you choose port 443 during ISPC installation?
     
  3. Jesse Norell

    Jesse Norell Well-Known Member

    The other option is to setup a vhost and proxy port 443 to 8080 or whatever you have ispconfig running on. But if you have a dedicated host for the control panel, certainly the easiest way is just that (specify port 443 in the ispconfig installation).
     
  4. k4t

    k4t New Member

    Will SNI work on a host with a single IP and ispconfig on 443?
     
  5. ahrasis

    ahrasis Active Member

    Mine is using dynamic IP with default ISPC port 8080. So far it works. Though I am not so sure about running it via port 443, my guess is, it should work just fine.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes. But you will have to set a domain name then in the ispconfig vhost and ensure that there is not a duplicate listen line for 443, as ispconfig assumes to have it's own port, so using 443 during install would cause apache to fail to start due to port 443 defined twice in the apache config.
     
    ahrasis likes this.
  7. Setup a new vhost with apache reverse proxy:
    Code:
    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://YOURCONTROLPANELURL/$1 [R,L]
    
    SSLProxyEngine on
    SSLProxyVerify none
    SSLProxyCheckPeerCN off
    SSLProxyCheckPeerName off
    SSLProxyCheckPeerExpire off
    ProxyPass / https://127.0.0.1:9999/  --> this is your ispconfig port
    ProxyPassReverse / https://127.0.0.1:9999/ --> again your ispconfig port
    
    (add this apache code to the options tab in the domain/subdomain you want to run the control panel)
     
    Pappmann and Jesse Norell like this.
  8. Jesse Norell

    Jesse Norell Well-Known Member

    Is there an rfe for ispconfig to set this up automatically? This type of solution is pretty frequently needed for various scenarios asked on the forums here, it'd be cool if ISPconfig would set this up.

    Eg. during installation, if the port ispconfig listens on is not 443, prompt for a website/domain name to configure on 443 to proxy the connection. Maybe also expose that as a setting in the main config, to be changed later.
     
  9. Pappmann

    Pappmann New Member

    Okay, thanks...thats working.
     
  10. Pappmann

    Pappmann New Member

    oh, this solution is not working behind a firewall that blocks all ports except 80/443 :(
     
  11. Jesse Norell

    Jesse Norell Well-Known Member

    The reverse proxy will work fine behind a firewall if the proxy connection is to 127.0.0.1 localhost address like shown, and is in fact one of the ways you could access ispconfig (running on a high port number) in such an environment. If you're trying to put the config sample into a vhost using the ispconfig interface, in order to bring up that very interface, then you would have a bit of a problem, but once it's setup it should work just fine.
     

Share This Page