• 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

How to force https on a symlinked directory in httpdocs?

J

jujuthing

Guest
Hi,
I have the following directory structure in my vhost:

typo3_src
---typo3
---etc.
httpsdocs
httpdocs
---typo3_src --> symlinked to ../typo3_src
---typo3 --> symlinked to typo3_src/typo3
---etc.

I have setup my vhost.conf file to allow acces to www.myhost.com/typo3 and this is all working well.
What i would like to do is force https in www.myhost.com/typo3. The problem i am having is that the appliaction (typo3) needs to think it is still in the directory httpdocs as that is where the localconf file for the instynce of typo3 is located (hence the symlinking). But whenever i force https i get the error msg. 'localconf file not found, cannot proceed' - so it would appear that i am not in httpdocs/typo3 anymore but have actually redirected to typo3_src/typo3(?)
Does anybody know how to solve this problem, ie. to force https on a symlinked diectory within httpdocs and remain in the httpdocs directory?
Cheers,
Simon
 
Hiya!
thx for the link. i also found this thread http://forum.sw-soft.com/showthread.php?threadid=5259&highlight=chwon
unfortunately i'm not quite there yet. you're solution works for like https://mydomain.com/index.html, but i can't get typo3 to heel yet over https. the error msg. is openbasedir restriction, but it's strange: open_basedir restriction in effect. File(/home/httpd/vhosts/mydomain.com/httpsdocs/typo3conf/temp_CACHED_ps387d_ext_tables.php) is not within the allowed path(s): (/home/xpdf:/usr/local/bin:/home/httpd/vhosts/mydomain.com/httpsdocs:/home/httpd/vhosts/mydomain.com/httpdocs:/tmp:/home/IM:/user/share/pear:/home/httpd/vhosts/mydomain.com/typo3_src) in /home/httpd/vhosts/mydomain.com/typo3_src/t3lib/class.t3lib_div.php on line 2020
but quite obviosly allowed dirs inlucdes /home/httpd/vhosts/mydomain.com/httpsdocs...
so i'm a bit lost here...
cheers,
Simon
 
ssl from httpdocs the easy way

i eventually found a solution, that works and appears to be easier then the symlinked httpsdocs solution - add the following to vhost_ssl.conf:

### DOCUMENT ROOT ###
DocumentRoot /home/httpd/vhosts/<domain>/httpdocs

### HTTPDOCS ###
<Directory "/home/httpd/vhosts/<domain>/httpdocs">
SSLRequireSSL
</Directory>
 
Back
Top