myPHPadmin, webmail and ISPConfig subdomains

Discussion in 'HOWTO-Related Questions' started by Donno, Jun 19, 2018.

  1. Donno

    Donno Member

    Hi,
    what is the easy and best way to change addresses for the following app that does not redirect
    example.com:8080/phpmyadmin -> sql.example.com
    example.com:8080/webmail -> mail.example.com
    example.com:8080 -> panel.example.com

    Must be fixed address not redirect, thanks for the help in advance.
     
  2. Donno

    Donno Member

    BTW using apache
     
  3. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Why are you using port numbers for phpmyadmin and webmail?
     
  4. Donno

    Donno Member

    That is from the default ispconfig 3.1 installation
     
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Not in my default ISPConfig installations.
     
  6. Donno

    Donno Member

    Create new website example.com and go to example.com:8080/phpmyadmin does it not work ?
     
  7. ahrasis

    ahrasis Well-Known Member

    There is a setting for that in default ISPConfig installations but will need to be enabled in the ISPConfig vhost, if you want to use the port for the apps.

    To use subdomain for apps you will need to create a website for them and copy or symlink the relevant folder to their web folder. Make sure that their vhost is rightly customized as well.

    It will be a little bit tricky for ISPConfig itself, so do search this forum on how to do it.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Of course it will not work as phpmyadmin is on port 80 and not 8080, so the URL to access phpmyadmin is http://example.com/phpmyadmin and not example.com:8080/phpmyadmin and the URL that gets used to access phpmyadmin from within ISPConfig has to be configured by the admin (you) under system > interface comfig and there you can set the URL where you installed phpmyadmin on your server like http://example.com/phpmyadmin
     
  9. Donno

    Donno Member

    https://example.com:8080/phpmyadmin/ mine works I just created a new website panel.example.com and it is blank then got to http://panel.example.com:8080/phpmyadmin/ then it works
     
  10. Donno

    Donno Member

  11. Donno

    Donno Member

  12. till

    till Super Moderator Staff Member ISPConfig Developer

    yes
     
  13. Donno

    Donno Member

  14. ahrasis

    ahrasis Well-Known Member

    For apps as subdomains:
    For ISPConfig as a subdomain, you can try to use reverse proxy in the subdomain vhost.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    The port for SSL is 443 and not 80 and you will have to add a ServerName line with the domain name that the vhost shall use.
     
  16. Donno

    Donno Member

    After a few days of trying and had to install ISPconfig a few times, I edit /etc/apache2/sites-available/ispconfig.vhost and changed the following to local

    NameVirtualHost 127.0.0.1:8080
    <VirtualHost 127.0.0.1:8080>

    I created sub domain panel.example.com then edit the file /etc/apache2/sites-available/panel.example.com.vhost and added the following to top line

    <VirtualHost *:80>
    ServerName panel.example.com
    Redirect 301 / https://panel.example.com/
    </VirtualHost>

    Just under <IfModule mod_ssl.c></IfModule> in Virtualhost 443 i added the following

    SSLProxyEngine On
    SSLProxyVerify none
    SSLProxyCheckPeerCN off
    SSLProxyCheckPeerName off
    SSLProxyCheckPeerExpire off
    ProxyVia off
    ProxyRequests off
    ProxyPreserveHost on
    ProxyPass / https://localhost:8080/
    ProxyPassReverse / https://localhost:8080/

    Now https://panel.example.com is working perfect but cannot setup mail.example.com it always redirects to mail.example.com/webmail/ where roundcube is installed i disabled the conf files and still redirect but with 404 i uninstalled roundcube and still it redirects. I cannot seem to find what is redirecting it. Is ISPconfig redirecting it ?

    I created a website mail.example.com then it works but my https://mail.example.com still redirects to https://mail.example.com/webmail/ any help ?

    BTW Getting Exact same with sql.example.com redirecting to example.com:8080/phpmyadmin/
     

Share This Page