: In CakePhP what is the recommended method for having one sub-domain that's outside the CakePhP environment? I have a CentOS VPS with LAMP installed. I set up CakePhP and I have my httpd.conf
I have a CentOS VPS with LAMP installed. I set up CakePhP and I have my httpd.conf set up with 1 virtual host which points to my CakePhP directory. I have various sub-domains in my CakePhP environment, which reside as sub-directories within my overall CakePhP directory.
But now I'd like to have a sub-domain that runs raw PhP, outside the CakePhP environment.
It's like this:
example.com/sub1 resides in /www/var/cakephp_install/sub1 example.com/sub2 resides in /www/var/cakephp_install/sub2 example.com/sub3 resides in /www/var/html/sub3
So sub3 is not a CakePhP App. It does not reside within the CakePhP environment. What is the best way to route or index or configure this? I've played with the httpd.conf, .htaccess, and index.php files. Nothing I've tried works.
More posts by @Murphy175
1 Comments
Sorted by latest first Latest Oldest Best
You'll need to:
1) Create a new A record for the subdomain, the process differs depending on your DNS setup. You may need to do this through your registrar, or if you're hosting your own DNS servers create the record yourself.
2) Setup a second virtual host in Apache. This should look something like
<VirtualHost *:80>
ServerName subdomain.domain.com
DocumentRoot /var/www/html/sub3
# Other directives can go here
</VirtualHost>
3) Restart Apache sudo apachectl restart or service httpd restart
Now if you drop a file called index.php containing <?php phpinfo(); into /var/www/html/sub3 and browse to subdomain.domain.com you should see your PHP settings page.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.