So I am not sure how this kind of set up it called so it is hard for me to google it and see if I am going in the right direction.
What I have currently
I have a CMS that has a vhost for www.example.com
, the admin interface for this is under a sub domain admin.www.example.com
.
What I need
Now apart from that CMS I need to have a forum platform up and running. This is how would like it to be set up
www.example.com
-> CMSwww.example.com/advice
-> forum
Is a set up like this possible with apache?
Details
I am running on centos7 with apache 2.4.6.
My current vhost is like the following
<VirtualHost *:80>
ServerName example.com
DocumentRoot /www/example.com
SetEnv ADMIN_DOMAIM 0
<Directory "/www/example.com>
AllowOverride All
Options FollowSymLinks
</Directory>
php_value mbstring.func_overload 0
DirectoryIndex index.php
</VirtualHost>
<VirtualHost *:80>
ServerName admin.example.com
DocumentRoot /www/example.com
SetEnv ADMIN_DOMAIN 1
<Directory /www/example.com>
AllowOverride All
Options FollowSymLinks
</Directory>
php_value mbstring.func_overload 0
DirectoryIndex index.php
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
SetEnv ADMIN_DOMAIN 0
ServerName example.com
DocumentRoot /www/example.com
<Directory /www/example.com>
AllowOverride All
Options FollowSymLinks
</Directory>
php_value mbstring.func_overload 0
DirectoryIndex index.php
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
SetEnv ADMIN_DOMAIN 1
ServerName admin.example.com
DocumentRoot /www/example.com
<Directory /www/example.com>
AllowOverride All
Options FollowSymLinks
</Directory>
php_value mbstring.func_overload 0
DirectoryIndex index.php
</VirtualHost>
Just create a directory called "advice" inside DocumentRoot (/www/example.com in your case) and install the forum platform there.
Also for the CMS to ignore that directory, you need to add the following to the .htaccess located inside of advice
RewriteCond %{REQUEST_FILENAME} !-d