Pointing subdomains to folder with forced https

Discussion in 'ISPConfig 3 Priority Support' started by djesys, May 30, 2018.

  1. djesys

    djesys New Member

    Probably very nooby, but before I break stuff again I thought I´d better ask.
    All I want is simply:


    admin.domain.tld to https://ip.ip.ip.ip:8080 for ispconfig
    b0x.domain.tld to https://ip.ip.ip.ip.ip:8081/webmail for roundcube
    php.domain.tld to https://ip.ip.ip.ip.ip:8081/phpmyadmin/ for phpmyadmin

    all using Let´s Encrypt with http to https rewrite

    I added A domains for admin, b0x and php and put the respective path into the "redirect" field.
    Also added the suggested nginx directives for phpmyadmin and roundcube.

    now I added the https://ip.ip.ip.ip .... line into the redirect field, trying out proxy, permanent and the http to https rewrite button.
    not really working. tick in LE box sticks however.

    can someone point me into the right direction or towards the right page in the manual ?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The proxy option should be ok for such a use case. Wich error do you get when you use proxy?
  3. djesys

    djesys New Member

    502 Bad gateway, and nginx error log shows: SSL_do_handshake() failed (SSL: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol) while SSL handshaking to upstream.

    whats really strange is that at least owncloud worked and now anything nginx is serving is spitting out this same error.
  4. djesys

    djesys New Member

    I started all over again, this time with 18.04 and Apache following this tutorial LINK.
    Everything working great.

    Back to my initial request, I am still looking for a way to point
    subdomain.domain.tld to the many webservices I am running.

    A simple redirect works, but I really need httpS to be enforced. On Nginx, this was done with the help of a proxy, but if I enable SSL and Let´s Encrypt, and choose "Proxy" as Redirect type I am getting and Internal Server Error and the Redirect Type jumps back to "No flag". Please point me in the right direction. thank you.
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Proxying plus LE is a bit tricky as you proxy the LE requests as well, so your backend service that receives the requests must be able to deliver the LE tokes in the same way that the ispconfig website would have done it.

    Actually, I won't do a setup on my servers in the way you try to set it up. If I would want to have roundcube in a website b0x.domain.tld, then I'll create that site and install roundcube into it and when I would want to use php.domain.tld for phpmyadmin, then I would do the same with phpmyadmin. But personally, I prefer the aliases as used by the Linux distributions as default.

    and when you want to have ispconfig listening on a specif comain and port 443 instead of 8080, then edit the ispconfig vhost, add a ServerName line for the domain and change the port to 443 and tne restart apache.
  6. djesys

    djesys New Member

    ok. I am just really happy its all working as it suppose to be, and imagined that proxyfying it and forcing HTTPS was not a difficult thing to do. I am more concerned about HTTPS.
    So would there be a way to HTTPS webservices through a proxy with apache ? I am talking about roundcube, deluge and madsonic. I used to set it up manually with nginx but i am new to apache.

Share This Page