phpmyadmin ssl

Discussion in 'Installation/Configuration' started by conductive, Nov 10, 2020.

  1. conductive

    conductive Member HowtoForge Supporter

    I just installed ISPconfig 3.2 on Debian 10 with NGINX.

    I can access phpmyadmin @ http://server.Mydomain.com:8081/phpmyadmin
    I can access phpmyadmin @ http://MyDomain.com:8081/phpmyadmin

    I can not access phpmyadmin @ https://server.Mydomain.com:8081/phpmyadmin
    I can not not access phpmyadmin @ https://Mydomain.com:8081/phpmyadmin
    -
    I ran the script @
    https://www.howtoforge.com/communit...l-port-8080-with-lets-encrypt-free-ssl.75554/
    My control panel is now encrypted with LE
    -
    I Added the https nginx directive in mydomain > options with - fastcgi_param HTTPS $https;

    What needs to be done to encrypt phpmyadmin connections?
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Does httpS work for ISPConfig panel? If so, on my system, which uses Apache but I do not think that would matter, PHPMyadmin also uses that same certificate and works with httpS.
    But what may not work is that port 8081, unless you have modified the configurations to use that port. On my system
    Code:
    https://hostname.domain.tld:8080 
    goes to ISPConfig panel with secure connection, and
    Code:
    https://hostname.domain.tld/phpmyadmin
    goes to PHPMyAdmin with secure connection.
     
  3. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    1. You shouldn't use that script with ISPConfig 3.2 and I would personally advise that you undo it immediately.
    2. Using 3.2 you should be able to get LE SSL certs for your server FQDN at install or update and will be extended to all services installed in your server including ISPConfig GUI or control panel vhost.
    3. However, it won't be automatically extended to your apps.vhost, so to enable https access, you'll need to copy paste some ssl lines from ispconfig.vhost to it.
     
  4. conductive

    conductive Member HowtoForge Supporter

    Thanks for the reply's.
    Code:
    https://hostname.domain.tld:8080 
    Yes it does go to ISPConfig with secure connection after running ahrasis script.
    Code:
    https://hostname.domain.tld/phpmyadmin
    No It did not.
    Do I need to create a site hostname.Mydomain.tld with LE for that to work?

    1. I did not know how to undo the script. I am reloading ISPConfig.
    2. That did not seem to work or I do not know how to implement this.
    3. I am not exactly sure where to find them or where to put them. I will have to re-read your post or ?
     
  5. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Yes.
     
    conductive likes this.
  6. conductive

    conductive Member HowtoForge Supporter

    I never created the site hostname.Mydomain.com and am reloading ISPconfig. I never tried turning LE on and off.
     
  7. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    By reloading you mean reinstalling? Why?
     
  8. conductive

    conductive Member HowtoForge Supporter

    I installed a fresh version of ISPconfig 3.2 Debian 10 w/ NGINX
    I added site hostname.mydomain.com with LE
    https://hostname.mydomain.com:8080 -- ISPconfig. == works

    http://hostname.mydomain.com:8081/phpmyadmin/ ===== works
    https://hostname.mydomain.com:8081/phpmyadmin/ ===== does not work
    I added phpMyAdmin directive to hostname.mydomain.com ==== does not work

    Added sites mydomain1, mydomain2 and mydomain3
    http://mydomain1, mydomain2, mydomain3:8081/phpmyadmin ==== work
    https://mydomain1, mydomain2, mydomain3:8081/phpmyadmin === do not work

    Adding phpMyAdmin https NGINx directives to sites do not help.
     
    Last edited: Nov 12, 2020
  9. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    You can't use the same port number (8081) for both http and https at the same time, configure it for one or the other.
     
  10. conductive

    conductive Member HowtoForge Supporter

    Yes. I want everything to work under https.
    How do I make phpMyAdmin work for https?
     
  11. conductive

    conductive Member HowtoForge Supporter

    I was told to undo the ahrasis script. I did not know how to undo the script so my best solution was to do a reload. It only takes a little over an hour.
     
  12. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    You can always ask :) but usually it means to just undo the steps from end to begin, removing new files, packages, etc. Reinstalling can cause more issues because you lose data, settings, etc.

    If I understand correctly PHPMyAdmin is working fine, just not on 8081?
    You can enable HTTPS for the Apps vhost. It is enabled if a certificate is present in /usr/local/ispconfig/interface/ssl.
    Maybe this works:
    Open the panel, go to System -> Server Config -> host.example.com -> Web -> Apps Vhost Settings. Disable Apps. then save. Then open the tab again, re-enable it, and save again.
     
  13. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Th0m likes this.
  14. florian030

    florian030 Well-Known Member HowtoForge Supporter

    it's the default for ispconfig. you can run phpmyadmin at every url but you have to add the directives to the site.
     
  15. conductive

    conductive Member HowtoForge Supporter

    Thanks for the awesome answer!
    Yes that works I now have LE secure access to hostname.Mydomain.com:8081/phpmyadmin
    ----
    Is is possible and/or what would I have to do to make phpMyAdmin accessible form other sites?
     
  16. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    If you have followed the perfect server guide, it should be available on anydomain.com/phpmyadmin
     
  17. conductive

    conductive Member HowtoForge Supporter

    I must be doing something wrong.
    When I go to MyDomain.com:8081/phpmyadmin LE does not work and I have to add a security exception
     
  18. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    just go to mydomain.com/phpmyadmin
    :8081 uses your ISPConfig panel cert which is ofcourse not valid for mydomain.com
     
  19. conductive

    conductive Member HowtoForge Supporter

    https Mydomain.com/phpmyadmin gives me ---- 404 error
    Added I added nginx https directive
    https Mydomain.com/phpmyadmin gives me ---- 500 error
     
  20. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

Share This Page