M
Martin Anderson
Guest
I'm trying to get a subdomain and the main domain to share a common code. The application they will be sharing has been configured to differentiate based on the incoming URL.
I've tried a couple of methods to get this working, but ultimately it seems to require getting the vhost.conf to be recognized, and I don't believe this is happening, based on the contents of the httpd.include files that are being generated. None of the settings in my vhost.conf for the subdomain are reflected.
My first attempt was to use the DocumentRoot directive to have the subdomain use the same httpdocs folder as the main domain. I followed that with a Directory block repeating the same options I had specified in the main domain's vhost.conf, including open_basedir.
I then ran "/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=mytrojanuv.com -v" which completed without error. A quick restart of Apache and... nothing. The subdomain still shows the default page.
My next approach was to make the httpdocs folder a symbolic link to the httpdocs folder of the main domain. This time, I set the vhost.conf to allow turn on FollowSymLinks, and added an open_basedir directive to allow directory access to both the main domain's httpdocs path and that for the subdomain.
Once again, I forced an update of the httpd.include (though the contents look the same as before), and restarted Apache. This time, I got a 403 Forbidden page, with the following messages:
"You don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request."
It's my belief in both cases that the failure is based on the vhost.conf not being read, or at least not being adopted. Any ideas why this might be happening?
Just so you know, I did place the the vhost.conf in:
/var/www/vhosts/mydomain.com/subdomains/mysubdomain/conf
Thanks in advance for any help, this has been extremely frustrating.
I've tried a couple of methods to get this working, but ultimately it seems to require getting the vhost.conf to be recognized, and I don't believe this is happening, based on the contents of the httpd.include files that are being generated. None of the settings in my vhost.conf for the subdomain are reflected.
My first attempt was to use the DocumentRoot directive to have the subdomain use the same httpdocs folder as the main domain. I followed that with a Directory block repeating the same options I had specified in the main domain's vhost.conf, including open_basedir.
I then ran "/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=mytrojanuv.com -v" which completed without error. A quick restart of Apache and... nothing. The subdomain still shows the default page.
My next approach was to make the httpdocs folder a symbolic link to the httpdocs folder of the main domain. This time, I set the vhost.conf to allow turn on FollowSymLinks, and added an open_basedir directive to allow directory access to both the main domain's httpdocs path and that for the subdomain.
Once again, I forced an update of the httpd.include (though the contents look the same as before), and restarted Apache. This time, I got a 403 Forbidden page, with the following messages:
"You don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request."
It's my belief in both cases that the failure is based on the vhost.conf not being read, or at least not being adopted. Any ideas why this might be happening?
Just so you know, I did place the the vhost.conf in:
/var/www/vhosts/mydomain.com/subdomains/mysubdomain/conf
Thanks in advance for any help, this has been extremely frustrating.