Subdomain - proxy missing from Redirect Type

Discussion in 'ISPConfig 3 Priority Support' started by Jemt, Feb 16, 2018.

  1. Jemt

    Jemt Member HowtoForge Supporter

    Hi,
    I previously had the option to select "Proxy" as Redirect Type for a subdomain but that option has somehow disappeared. I recently upgraded from Debian 7 to Debian 8. I have made sure proxy_http is enabled - what more needs to be in place to enable the proxy option again ?

    Debian 8, Apache 2.4.30, PHP 5.6.30, ISPConfig 3.1.9

    - Thanks

    Jimmy
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    As far as I know, ISPConfig has a proxy option on nginx servers only and not apache servers. Are you sure that you have seen that on an apache server?
     
  3. Jemt

    Jemt Member HowtoForge Supporter

    Yes, 100% sure - I have used it on Apache. I have never used ISPConfig with nginx.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I had a quick look at the ISPConfig code in master and stable branch, a proxy option exists only for nginx.
     
  5. Jemt

    Jemt Member HowtoForge Supporter

    I guarantee you it has been there in previous versions then. I have used it, and I have existing subdomains with that option enabled. It has been removed at some point then.
    - And I know, because I spent 200 hours extending features in our product that relies on the Proxy ability.
     
  6. Jemt

    Jemt Member HowtoForge Supporter

    Here's a screenshot of one of the subdomains configured with Proxy. Let me know if you need additional details about the server.
     

    Attached Files:

  7. till

    till Super Moderator Staff Member ISPConfig Developer

    On that server were you made that screenshot, go to System > server config > web, and let me know what you see there in the 'Server type' line.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    And click on the redirect type select on the page where you made the screenshot so that all options in that select field are visible and make a screenshot and post that.
     
  9. Jemt

    Jemt Member HowtoForge Supporter

    Attached are the screenshots you requested. Thanks for investigating this.
     

    Attached Files:

  10. Jemt

    Jemt Member HowtoForge Supporter

    Notice that the Proxy option was not initially available when I was running Debian 7 - I had to enable the proxy_http module to make the option appear in the drop down. But there was no "hacking" involved.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    The options in the select field depend on the server type only, ISPConfig does not contain any code to recognize the proxy_http module in apache and to add a proxy option when it is present. Maybe you added some kind of third party extension or patch for that but that's not a function from ISPConfig core.
     
  12. Jemt

    Jemt Member HowtoForge Supporter

    Will it change anything if I spend a day restoring a backup of the server running the version of ISPConfig with support for Proxy, proving that the feature was once available for Apache? Will the feature be re-introduced? We did not hack this, nor did we install any extensions except for enabling proxy_http. We document _everything_ we do on this server - it's a production server hosting several large websites.

    This is the log entry I made in September 2016 related to this:
    ---
    Added proxy_http to Apache allowing rewrites to different domains (internals only since
    Proxy Requests are not enabled by default which is GOOD since it would otherwise make the
    server an open HTTP proxy).
    Enable module: a2enmod proxy_http
    service apache2 restart
    ---
     
    Last edited: Feb 20, 2018
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you know which exact ISPConfig version you had on that server? You can find the version information in the file /usr/local/ispconfig/interface/lib/config.inc.php
     
  14. Jemt

    Jemt Member HowtoForge Supporter

    I have asked a colleague to try find a backup made around the time of the upgrade. Fingers cross they have not been removed yet by the backup rotation mechanism. I'll get back to you later.
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    If you choose the ispconfig backup option of the updater, then you can find ISPConfig backups in /var/backup as well.
     
    Jemt likes this.
  16. Jemt

    Jemt Member HowtoForge Supporter

    Unfortunately we no longer have a backup of the server from the HyperVisor so we are left with the backups created by the update script. Our best guess is that we ran the following version at the time:

    //** Application
    define('ISPC_APP_TITLE', 'ISPConfig');
    define('ISPC_APP_VERSION', '3.0.5.4p8');
    define('DEVSYSTEM', 0);

    Is this of any help ?
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no proxy option in that version too and I checked also an older version 3.0.5.3. See screenshot. I contacted the other ISPConfig developers and they confirmed that a proxy option was and is not implemented for apache. May you please post the vhost file of one of the sites were you have that proxy option enabled? Just replace the domain names inside before you post it.
     

    Attached Files:

  18. Jemt

    Jemt Member HowtoForge Supporter

    Hello again.
    Sure, here is the vhost file which is untouched by human hand:
    http://codemagic.dk/xyzabc.org.vhost.txt

    - Well, I did replace the domains as you suggested, but the content has been generated.
     
  19. Jemt

    Jemt Member HowtoForge Supporter

    Was it of any help ?
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    I've discussed this with the other ISPConfig core developers and there was no such function in the past, at least not intentionally. What we guess is that there must have been an error in the javascript code in one sub release which caused the nginx proxy option to be visible on apache servers, and by coincident, the long form syntax of the apache [P] rewrite matches the rewrite from nginx when written into the database and that's how it was possible that this javascript error resulted in a working proxy option for apache servers. I'll add a feature request for the next release to officially enable the proxy option for apache servers.
     

Share This Page