Setting up concrete's demo subdomain with cpanel
Permalink
I dont know much about Cpanel or linux for that matter I just do a bit of php programming and like most of you i love c5. I am trying to follow the how-to to setup the "Setup a subdomain based demo server". My problem is not really with the instructions but I do not know how to change the virtualhost directives in cpanel, I suspect its relatively simple but im relatively new to linux and cpanel can anyone shed a little light on this for me?
For cPanel just create an account the way you normally would, and instead of putting in the root domain, put in the sub domain of your choice and create the account as normal. You will not need to update anything else.
It is the below step I am trying to complete. But in cpanel I am told that the httpd.conf file will not take the changes if changed manually.
Step Six: Modify the server’s configuration file.
This document assumes you will be running concrete5 on Apache. The following is an example of how we use Apache’s VirtualDocumentRoot directive to map these hostname-based demos to a particular directory on the server.
VirtualDocumentRoot "/var/www/concrete5_demos/%1/"
ServerAlias *.yourdomain.com
AliasMatch ^/concrete/(.*) /usr/local/share/concrete5/concrete5.4.0.5/concrete/$1
php_value include_path ".:/usr/local/share/concrete5/concrete5.4.0.5"
This is pretty straightforward. We’re creating a new virtual host that answers to any subdomain request on yourdomain.com. Whatever the requested subdomain, the request is routed to that subdomain’s directory in /var/www/concrete5_demos/. So testuser1.yourdomain.com would route to /var/www/concrete5_demos/testuser/. The AliasMatch and php_value lines setup our shared source directory, which is located within /usr/local/share/concrete5/.
Step Six: Modify the server’s configuration file.
This document assumes you will be running concrete5 on Apache. The following is an example of how we use Apache’s VirtualDocumentRoot directive to map these hostname-based demos to a particular directory on the server.
VirtualDocumentRoot "/var/www/concrete5_demos/%1/"
ServerAlias *.yourdomain.com
AliasMatch ^/concrete/(.*) /usr/local/share/concrete5/concrete5.4.0.5/concrete/$1
php_value include_path ".:/usr/local/share/concrete5/concrete5.4.0.5"
This is pretty straightforward. We’re creating a new virtual host that answers to any subdomain request on yourdomain.com. Whatever the requested subdomain, the request is routed to that subdomain’s directory in /var/www/concrete5_demos/. So testuser1.yourdomain.com would route to /var/www/concrete5_demos/testuser/. The AliasMatch and php_value lines setup our shared source directory, which is located within /usr/local/share/concrete5/.