Virtual Subdomains and Wildcards

w3media

Registered
Sep 1, 2007
2
0
51
People,

I am searching and searching for over 7 hours now to get my website working on cPanel.

I have a website which was running on Plesk 7.5 for several years. Now I sold the website and the buyer wants me to install it on his hosting server running:

WHM 11.2.0 cPanel 11.10.0-S16448 + CENTOS Enterprise 5 i686 - WHM X v3.1.0

What I did was:
1. Uploaded all files using FTP
2. Imported the complete database and the front page is working.

To get the virtual subdomains working I did:
3. Add a A record called * linked to the IP of the server/website
4. opened /usr/local/apache/conf/httpd.conf and searched for:

Code:
<VirtualHost 85.17.177.209>
ServerAlias www.geilestart.com
ServerAdmin [email protected]
DocumentRoot /home/geilesta/public_html
ServerName geilestart.com

User geilesta
Group geilesta
BytesLog /usr/local/apache/domlogs/geilestart.com-bytes_log
CustomLog /usr/local/apache/domlogs/geilestart.com combined
ScriptAlias /cgi-bin/ /home/geilesta/public_html/cgi-bin/
</VirtualHost>
I've changed this to:
Code:
<VirtualHost 85.17.177.209>
ServerAlias www.geilestart.com *.geilestart.com
ServerAdmin [email protected]
DocumentRoot /home/geilesta/public_html
ServerName geilestart.com

User geilesta
Group geilesta
BytesLog /usr/local/apache/domlogs/geilestart.com-bytes_log
CustomLog /usr/local/apache/domlogs/geilestart.com combined
ScriptAlias /cgi-bin/ /home/geilesta/public_html/cgi-bin/
</VirtualHost>
After this action:
5. service httpd restart

I can see the website's frontpage on www.geilestart.com but when I click a subdomain like http://uw.geilestart.com/ I see:

Great Success !
Apache is working on your cPanel® and WHM™ Server


Anyone any idea what is wrong?

Any help will be much appreciated!

Best regards,

w3Media
 

Infopro

Well-Known Member
May 20, 2003
17,090
519
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Should be:


Code:
<VirtualHost 85.17.177.209>
ServerAlias www.geilestart.com
ServerAdmin [email protected]
DocumentRoot /home/geilesta/public_html
ServerName geilestart.com

User geilesta
Group geilesta
BytesLog /usr/local/apache/domlogs/geilestart.com-bytes_log
CustomLog /usr/local/apache/domlogs/geilestart.com combined
ScriptAlias /cgi-bin/ /home/geilesta/public_html/cgi-bin/
</VirtualHost>


<VirtualHost 85.17.177.209>
ServerAlias www.[COLOR="Red"]uw.[/COLOR]geilestart.com
ServerAdmin [email protected]
DocumentRoot /home/geilesta/public_html/[COLOR="Red"]uw[/COLOR]
ServerName geilestart.com

User geilesta
Group geilesta
BytesLog /usr/local/apache/domlogs[COLOR="red"][COLOR="Red"]/uw.[/COLOR][/COLOR]geilestart.com-bytes_log
CustomLog /usr/local/apache/domlogs/geilestart.com combined
ScriptAlias /cgi-bin/ /home/geilesta/public_html[COLOR="Red"]/uw/[/COLOR]cgi-bin/
</VirtualHost>
Creating a subdomain via the accounts cPanel should have added these correctly.
Any reason you choose to go the manual route? Just curious.
 

w3media

Registered
Sep 1, 2007
2
0
51
Because the website is a so called 'Startpage script' where users can create their own subdomain pages realtime ;)