Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a Facebook app on my server and I need to run it both at http and at https. Now I have two different folders on my server: httpdocs and httpsdocs. How could I point now from the httpsdocs folder to the "normal" httpdocs folder that contains the files/page?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

The easiest answer is to change the DocumentRoot of the SSL virtual host to the same folder as the non-SSL virtual host. In other words, change httpsdocs to httpdocs in the configuration file.

share|improve this answer
add comment

To begin with, you can point both your HTTP and HTTPS vhosts to the same directory - if there are no different files, there is not reason to keep two identical directories.

And, if you really need two separate directories, you can make symbolic links to keep the identical content in sync:

ln -s /var/www/httpdocs/somefileordirectory /var/www/httpsdocs/

You can see man ln for more information.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.