ISPconfig3 Nginx Reverse Proxy ( Issue with SSL and LetsEncrypt )

Discussion in 'Installation/Configuration' started by OptimBro, Mar 17, 2018.

  1. OptimBro

    OptimBro Member

    Hello Team,

    I just found information somewhere on the internet that ISPconfig also works with nginx reverse-proxy. So I tried to install with nginx reverse proxy.

    I installed the server with this guide ( without any errors ). Also, everything was working fine from normal site to SSL site with lets encrypt. Then I installed nginx using apt-get install nginx command.
    Then I configured the panel for Nginx Reverse Proxy by following a guide on Github. ISPconfig Nginx Reverse Proxy
    I copied ( nginx_reverse_proxy_plugin.vhost.conf.master & vhost.conf.master ) in /usr/local/ispconfig/server/conf-custom/
    then I created a symlink from /usr/local/ispconfig/server/plugins-available/nginx_reverse_proxy_plugin.inc.php to /usr/local/ispconfig/server/plugins-enabled/nginx_reverse_proxy_plugin.inc.php
    then I created a new site from control panel. The load indicator was taking much time. I restarted mysql and then again tried to create site. This time it was created and was working fine.
    Then I enabled SSL and LetsEncrypt option but it was not working. After that I pasted below directive from /usr/local/ispconfig/server/conf/nginx_vhost.conf.master to /usr/local/ispconfig/server/conf-custom/nginx_reverse_proxy_plugin.vhost.conf.master
    ## Allow access for .well-known/acme-challenge
    location ^~ /.well-known/acme-challenge/ {
    access_log off;
    log_not_found off;
    root /usr/local/ispconfig/interface/acme/;
    autoindex off;
    index index.html;
    try_files $uri $uri/ =404;
    }

    This time LetsEncrypt issued the SSL and SSL and LetsEnrypt was ticked marked in panel. Also, apache was configured for SSL with letsencrypt crt and key. The only issue I am facing is that nginx reverse proxy plugin is not updating the nginx vhost file with SSL and LetsEncrypt.

    Server: Debian 9 Linode 1GB RAM
    ISPconfig Latest Version
    Apache running on Port 82

    Thank You
     
  2. inside83

    inside83 Member

    Hi,

    Did you manage to sort it out?

    I'm asking because I'd like to try and see if there's any performance improvement if I configure nginx as reverse proxy on my server.
     
  3. OptimBro

    OptimBro Member

    Hi

    Yes, but with manual configuration. Its an headache. Nginx alone can provide better performance. I tried to use Apache+Nginx for hosting WordPress, specially to provide support for .htaccess, modsecurity and pagespeed. Now, they are working fine with nginx and there is no special need for .htaccess in WordPress anymore.

    Thanks
     
  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    ISPConfig only support either nginx or apache out of box and not the mix of both.
     
  5. OptimBro

    OptimBro Member

    Yes, but with some manual configuration it can support both, I have seen reverse proxy related files on their repo. That files needs some modifications and few for letsencrypt SSL.

    I don't know PHP, so I have to generate nginx Vhost files, and issue LetsEncrypt SSL manually, It worked well for me.

    Ps: Now, I use nginx only, reverse proxy was needed to add support for .htaccess, not needed anymore.

    Thanks
     
  6. inside83

    inside83 Member

    I have ISPConfig VPS's with Apache and nginx, both with Wordpress clients that have higher number of visitors (over 10k/day) and I find servers with Apache to be faster.
    What's your experience @DARK9Y8 ?
     
  7. OptimBro

    OptimBro Member

    Same like you, I mostly handle WP sites so having apache as backend and Nginx in front boosts performance and also provides .htaccess suppport which many of my client needs badly.

    Btw, how do you accomplish ISPConfig for such setup?

    My setup is ISPCONFIG with Apache, and I have I have manually create/update nginx vhost, and also to issue letsencrypt ssl manually from SSH.

    You have automation or doing it manually?

    Thanks
     
  8. Peter Oudenes

    Peter Oudenes Member

    I know this is a old thread. But will post my solution to let websites work behind NGinx Proxy Manager

    In web domain > options in section Apache Directives I those 3 lines only:

    SSLProxyEngine on
    ProxyPreserveHost On
    ProxyPass /forum http://localhost
    ProxyPassReverse / http://localhost

    Now I can add more domains and they will forward correct by NPM...
     

Share This Page