nginx_reverseproxy_plugin.inc.php - how to activate

Discussion in 'Installation/Configuration' started by simplyit, Jun 24, 2012.

  1. simplyit

    simplyit New Member

    Hello,
    I'm trying to setup ispconfig3 multiserver with nginx reverseproxy ( client<->nginx<->apache), when I was searching nginx files in ispconfig dir I found souch thing:

    # find /usr/local/ispconfig | grep nginx
    /usr/local/ispconfig/server/conf/nginx_apps.vhost.master
    /usr/local/ispconfig/server/conf/nginx_vhost.conf.master
    /usr/local/ispconfig/server/scripts/create_daily_nginx_access_logs.sh
    /usr/local/ispconfig/server/plugins-available/nginx_reverseproxy_plugin.inc.php
    /usr/local/ispconfig/server/plugins-available/nginx_plugin.inc.php

    And my question is HOW to activate that plugin in order to make ispconfig make two .vhosts one for apache on port 82, and one for nginx on port 80 and 443 for ssl.

    I need to setup it quite immediately ( my nginx + php-fpm was fast but was causing a lot of problems with sites configuration, so I need to change setup. )
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The plugin is not developed and tested anymore, so I'am not sure if it will work at all with the current ispconfig versions. If you like to try it, then activate it with:

    ln -s /usr/local/ispconfig/server/plugins-available/nginx_reverseproxy_plugin.inc.php /usr/local/ispconfig/server/plugins-enabled/nginx_reverseproxy_plugin.inc.php
     
  3. simplyit

    simplyit New Member

    And how to check if it works?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    When the apache config is written in the way you want it to have, then it works,. Otherwise it downt work.
     
  5. MaddinXx

    MaddinXx Member HowtoForge Supporter

    In general, are the plugin files the one to customize to change ispconfig behavior like vhosts port etc?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The plugin files process all server actions. Normally you dont have to change any plugin files, instead you change the config file templates that were loaded and processed by the plugins.
     
  7. MaddinXx

    MaddinXx Member HowtoForge Supporter

    Hi till

    thanks! Hm yay, I tried it first with custom conf files, but since you have to hard-code the port their, you can't use it with SSL - so the best way is to customize the plugin file.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Wha that? You can define the ports in the tempalte for ssl and non ssl websites without having to change the plugin. Just use the template if statements to select beween ssl and non ssl ports.
     
  9. MaddinXx

    MaddinXx Member HowtoForge Supporter

    Wasn't aware of this! Great hint & programmed!

    So something like this should/does do the trick:

    Code:
    <tmpl_if name='ssl_enabled'>
        <VirtualHost {tmpl_var name='ip_address'}:443>
    <tmpl_else> 
        <VirtualHost {tmpl_var name='ip_address'}:82>
    </tmpl_if>
     

Share This Page