EDIT:-- Before anyone points it out, yes i know i can go to cpanel > subdomains, no in this case that is not an option.
I need to config a cpanel account to use mod_vhost_alias to convert folders under /public_html to subdomains.
I.e. if i create the folder /public_html/test i need test.domain.co.uk to just work.
I have the setup working under Elementary OS (its basically Ubuntu 14.04 LTS), i need it to work on a cpanel server though.
So far i have:
- Rebuilt easy apache to include mode_vhost_alias
- for the account i have setup a wildcard DNS entry (A record)
- in the accounts custom config (/var/cpanel/userdata/scweb/domain.co.uk) i have changed the doumentroot to /home/scweb/public_html/%1/ as per the mod_vhost_alias docs.
- in the accounts custom config i have also changed the serveralias to *.scwebdesign.co.uk
i have restarted the httpd service
under public_html i have created a directory called test and inside that an index.html file.
Still, i cant get this to work. Does anyone have any ideas? (full account config):
I need to config a cpanel account to use mod_vhost_alias to convert folders under /public_html to subdomains.
I.e. if i create the folder /public_html/test i need test.domain.co.uk to just work.
I have the setup working under Elementary OS (its basically Ubuntu 14.04 LTS), i need it to work on a cpanel server though.
So far i have:
- Rebuilt easy apache to include mode_vhost_alias
- for the account i have setup a wildcard DNS entry (A record)
- in the accounts custom config (/var/cpanel/userdata/scweb/domain.co.uk) i have changed the doumentroot to /home/scweb/public_html/%1/ as per the mod_vhost_alias docs.
- in the accounts custom config i have also changed the serveralias to *.scwebdesign.co.uk
i have restarted the httpd service
under public_html i have created a directory called test and inside that an index.html file.
Still, i cant get this to work. Does anyone have any ideas? (full account config):
Code:
---
customlog:
-
format: combined
target: /usr/local/apache/domlogs/domain.co.uk
-
format: "\"%{%s}t %I .\\n%{%s}t %O .\""
target: /usr/local/apache/domlogs/domain.co.uk-bytes_log
documentroot: /home/scweb/public_html/%1/
group: scweb
hascgi: 1
homedir: /home/scweb
ifmoduleconcurrentphpc: {}
ifmoduleitkc: {}
ifmodulemodincludec:
directoryhomescwebpublichtml:
ssilegacyexprparser:
-
value: " On"
ifmodulemodsuphpc:
group: scweb
ip: 130.185.146.188
owner: root
phpopenbasedirprotect: 1
port: 80
scriptalias:
-
path: /home/scweb/public_html/cgi-bin
url: /cgi-bin/
-
path: /home/scweb/public_html/cgi-bin/
url: /cgi-bin/
serveradmin: [EMAIL][email protected][/EMAIL]
serveralias: "*.domain.co.uk"
servername: domain.co.uk
usecanonicalname: 'Off'
user: scweb
userdirprotect: ''
Last edited by a moderator: