-1

I've done some basic HTTPS sites on my shared hosting, but in my hosting provider the folders in filesystem are different for SSL and the regular website. Is this an option, or is it required for the two to be separate? That is, https://www.example.com loads a different folder on the virtual host as opposed to http://www.example.com

If the file folders are different, then what should I do about session storage if it is a custom session storage that is stored in my websites filesystem that is different between HTTP and HTTPS sites? And what about other files, such as users custom-uploaded files, do I have to sync them somewhat?

If I set up my own server, then is it possible for me to run HTTPS and HTTP from the same folder?

Thank you!

kristovaher
  • 164
  • 5
  • `If I set up my own server, then is it possible for me to run HTTPS and HTTP` - Yes. As for the rest, you will probably need to work with your provider. – Zoredache Oct 01 '12 at 19:00

1 Answers1

2

It is not required that SSL and non-SSL filesystems be different, they can point to the same directory. In my experience, if they are separate, it is generally due to trying to keep the server code clean and to ensure that any and all resources needed for SSL are available under the SSL folder (i.e. avoid the "some resources were not loaded because they were not secure" browser error).

A common option for sharing code/resources is to enable sym-links (Apache?) and then in the SSL version simply reference the symlinks that point to the original files so that they are effectively "shared" by both directories.

landonz
  • 311
  • 2
  • 4