1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Help httpsdocs folder missing

Discussion in 'Plesk 11.x for Linux' started by ninjaThomas, Dec 13, 2012.

  1. ninjaThomas

    ninjaThomas New Pleskian

    10
     
    Joined:
    Dec 13, 2012
    Messages:
    4
    Likes Received:
    0
    I recently was forced to upgrade to Plesk 11 from version 9 and my httpsdocs folder no longer exists when accessing the site over https.

    I used to have my content split so users would see one site if the accessed it via http, and a completely different site when accessing the domain via https.

    Is there any way to get this functionality back, maybe by switching something in the Plesk control panel, or adding some script to an htaccess config file?

    Thanks,
    Thomas
     
  2. Sergey L

    Sergey L Golden Pleskian Staff Member

    32
    43%
    Joined:
    Aug 10, 2006
    Messages:
    1,195
    Likes Received:
    30
    Due to very low need in a described pattern (completely different sites for SSL and non-SSL) it has been discontinued since Plesk 10.x (in 2010).

    As a workaround you could try
    1) add a dispatcher in your code (i.e. in PHP prepend script) - show different content depending on whether you are accessed by SSL or not
    2) setup different site on SSL and add mod_rewrite rules into .htaccess of non-SSL site. Opposite case (redirect from SSL site to non-SSL) would work too.
     
  3. ninjaThomas

    ninjaThomas New Pleskian

    10
     
    Joined:
    Dec 13, 2012
    Messages:
    4
    Likes Received:
    0
    First off, thank you for your response.

    Unfortunately, I don't think either of those options will work. I cannot have the SSL site in a subfolder within the non-SSL site, and from my understanding, that's what would need to be done in order to redirect using a .htaccess file. There is no way to switch from one directory within linux to another directory, it can only go to a sub directory, based on the URL path.

    If I am incorrect in thinking this, please let me know, because that would solve my problem. If I were able to redirect a user to a completely different directory outside of the domain directory structure of the non-SSL site being accessed.

    I cannot do the first suggestion because I run into the same issues as the htaccess file (as far as I know.) If I am wrong about either of these, and they are able to access different directories outside of their own, then please let me know how.

    Thank you,
    Thomas
     
  4. Sergey L

    Sergey L Golden Pleskian Staff Member

    32
    43%
    Joined:
    Aug 10, 2006
    Messages:
    1,195
    Likes Received:
    30
    Well, I am not so much of mod_rewrite expert, so I maybe wrong, but just some thoughts -

    Indeed you are probably correct that you can go into subfolder only while within the same site (domain name). Still you could probably make the mapping into SSL subfolder
    http://domain.com:80/ssl -> https://domain.com:443
    http://domain.com:80 -> /
    https://domain.com:443 -> /ssl

    Alternatively if you can afford different domain (or subdomain) you could maybe do redirects like
    http://domain.com:80 -> https://ssl-domain.com:443
    or
    http://domain.com:80 -> https://ssl.domain.com:443

    where ssl-domain.com and ssl.domain.com would be hosted out of domain.com docroot

    I didn't try configuring these examples though
     
  5. ninjaThomas

    ninjaThomas New Pleskian

    10
     
    Joined:
    Dec 13, 2012
    Messages:
    4
    Likes Received:
    0
    Thanks.

    I'll have to give that a try and hope it works with my current configuration. I'm making some API calls to outside vendors and they require that the calls be made from the main domain, I can't use sub-domains, so that option is out.

    For the mapping, is that still done within the .htaccess file, or is that done within the httpd.conf?
     
  6. ninjaThomas

    ninjaThomas New Pleskian

    10
     
    Joined:
    Dec 13, 2012
    Messages:
    4
    Likes Received:
    0
    Hi Sergey,

    I tried the rewrite rules mentioned above, and while they did redirect the user properly, the https site is broken because it requires that it be in the root directory.

    Do you have any other suggestions that may get around this issue?
    Is there really no way to split up http and https again?

    It used to work, which means that it must be able to work again somehow.

    I have full access to the server and am able to change any files necessary to get that split working again.

    Thank you,
    Thomas
     
  7. Sergey L

    Sergey L Golden Pleskian Staff Member

    32
    43%
    Joined:
    Aug 10, 2006
    Messages:
    1,195
    Likes Received:
    30
Loading...