Create the directory for the subdomain. I usually create the new directory just like I create a regular domain.
[root@myserver /]# mkdir /websites/party.mumbleabout.com
[root@myserver /]# mkdir /websites/party.mumbleabout.com/html
[root@myserver /]# cd /websites/party.mumbleabout.com/html
Now use Nano, Vi, or your favorite text editor to create the index page:
[root@myserver /]#  nano index.html
And put something in the page as a placeholder, like: party.mumbleabout.com coming soon
Now, edit your Apache config file:
[root@myserver /]# nano /etc/httpd/conf/httpd.conf
This next step is really important… Make sure you put the subdomain BEFORE the main domain name in the config file.
I spent a long time trying to troubleshoot my configuration, and nobody had any posts with this information. I hope that I can save others a lot of wasted time.
Here is an example VirtualHosts setup:
Now, make sure that you restart your web server:
[root@myserver /]# /etc/init.d/httpd restart
Test your page:
http://party.mumbleabout.com
And you’re good to go!
PS – make sure that you allow enough time for your changes to propagate before you test it. Your mileage may vary! Good luck!
0 Comments
G+ Comments
Comments

0 comments:

Post a Comment

 
Top

Nhận xét mới đăng tải!

Loading…
X