https and http in different folders

Discussion in 'Installation/Configuration' started by gscaglia, May 13, 2008.

  1. gscaglia

    gscaglia Member HowtoForge Supporter

    Hi,
    in a webserver in production with ISPConfig, there's a website with a part in http and a part in https.

    The Apache DocumentRoot of http://www.domain.it is /home/www/web99/web/ while the DocumentRoot of https://www.domain.it is /home/www/web99/web_ssl/ (as in the Plesk panel, which has separate directories: httpdocs and httpsdocs).

    In November I've changend a file of ISPConfig and so, when the option SSL in the website control panel has selected, the Apache directives in /etc/apache2/vhosts/Vhosts_ispconfig.conf are correct.

    Unfurtunately, I missed the how-to (perhaps copied from a trhead in HowtoForge, but I don't find it) and now, after the upgrade of ISPConfig, the file are rewriting.

    I've two questions, please:
    1) What is (and where is) the ISPConfig file who writes the Apache directives in Vhosts_ispconfig.conf?
    2) Is this the best way to obtain the desired behavior?

    Thanks a lot
     
  2. geek.de.nz

    geek.de.nz New Member

    grep -R 'VirtualHost' /dir/to/ispconfig

    I assume ISPConfig is mostly written in PHP. You should then find the string VirtualHost somewhere. Sorry don't know the details.
     
  3. gscaglia

    gscaglia Member HowtoForge Supporter

    Great, thank you very much! :)

    The file who writes the Apache directives in Vhosts_ispconfig.conf is:
    /root/ispconfig/scripts/lib/config.lib.php

    I've added a suffix "_ssl" at line 1589 (ISPConfig version 2.2.23), I've restarted the control panel (/etc/init.d/ispconfig_server restart) and now the DocumentRoot for the VirtualHosts :443 (https) are different (/web_ssl instead /web). :D

    Is this a good way or there may be some problems?

    Thanks
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Generally I do not see a problem with this solution, but you should be aware that your change will be overridden after a update and you will have to modify the file again.
     

Share This Page