How hide SSL Port on url

Discussion in 'Installation/Configuration' started by GarGamel55, Jul 18, 2011.

  1. GarGamel55

    GarGamel55 New Member

    Hi,

    In /etc/apache2/conf.d/squirrelmail.conf, i've change the alias and comment out the ssl part, and i add this line (at the end) :

    Code:
    RewriteEngine on
    RewriteCond %{HTTPS} !^on$ [NC]
    RewriteRule . https://%{HTTP_HOST}:50443%{REQUEST_URI} [L]
    When i try http://xx.xxx.xxx.xx/myalias, i'm redirect to https://xx.xxx.xxx.xx:50443/myalias

    1) How to hide the port 50443 on url ?
    2) If i try http://xx.xxx.xxx.xx:50443/myalias (without s), i've a 400 bad request and the server show my hostname like : hints:https://hostname:50443/myalias ---> how to hide this too ?

    Thanks
     
  2. Ben

    Ben ISPConfig Developer ISPConfig Developer

    You can not hide this port (or the port in the URL if it is no protocol standard port, e.g. 80 for http and 443 for https). It is implicitly necessary as it tells the browser to connect with which server with which protocol and on which port.

    So either you move your ssl things to 443 or you need to live with that.


    The same is with the error message. You may change the error message itself (design etc.) but it is still an error. As from the side of your webserver an unencrypted request on a port that is supposed to serve via ssl this is simply a bad request.
     
  3. George69004

    George69004 New Member


    Hello I have the same problem. Are you sure that I cant hide the ports?
     
  4. sjau

    sjau Local Meanie Moderator

    why hide ssl indication?
     
  5. arachman

    arachman New Member

    You can only "hide" the port on multiserver setup (ISPconfig interface on separate server)
     
  6. Jesse Norell

    Jesse Norell Active Member

    You can let ispconfig control panel run on a different port (eg. default 8080) then create a vhost on port 443 which reverse proxies the connection to localhost:8080 and it will hide the port number (because it uses the https default port, 443). I posted some apache config which did that some months ago, but I believe nginx should do that as well.
     
  7. Reaz Mahmood

    Reaz Mahmood New Member

    Would you please elaborate this setting a bit more. I would like to implement this setting.
    Thanks
     
  8. Jesse Norell

    Jesse Norell Active Member

Share This Page