• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Help httpsdocs folder missing

ninjaThomas

New Pleskian
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
 
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.
 
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
 
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
 
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?
 
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
 
Back
Top