LRgraham14 Posted September 2, 2007 Share Posted September 2, 2007 ok, so basically what i want to do is make forum.domain.com point to the /forum folder on my server, i can access the forum by going to domain.com/forum but i want the forum folder to be like the root folder for forum.domain.com, i know you can forward the subdomain but thats not really what i want i am running my own server on windows with apache 2.2, php5 mysql and phpmyadmin, i have full access to the server (its in my house) and i have a domain through godaddy and im using their totaldns service to link my server ip to the domain Any help will be great, Thanks! Quote Link to comment Share on other sites More sharing options...
trq Posted September 2, 2007 Share Posted September 2, 2007 You need to add a vhost to your httpd.conf file, at its simplest something like... NameVirtualHost * # This is the default host. <VirtualHost *> DocumentRoot /var/www/default </VirtualHost> # This is the new vhost. <VirtualHost *> ServerName forum.hostname.com DocumentRoot /var/www/forum </VirtualHost> Quote Link to comment Share on other sites More sharing options...
LRgraham14 Posted September 2, 2007 Author Share Posted September 2, 2007 under the apache config file i know i have to uncomment at least 1 things, they are #LoadModule vhost_alias_module modules/mod_vhost_alias.so and #Include conf/extra/httpd-vhosts.conf are these the only ones that need to be uncommented, and also what do i put for the subforum ip address under godaddy as it wont let me pru forum.ipaddress Thanks Quote Link to comment Share on other sites More sharing options...
trq Posted September 2, 2007 Share Posted September 2, 2007 Yeah uncomment both those lines. You might also want to take a look at #Include conf/extra/httpd-vhosts.conf as it most likely has some vhost examples. As for your ip, you don't need one if you use named vhosts as shown in my example. Quote Link to comment Share on other sites More sharing options...
LRgraham14 Posted September 2, 2007 Author Share Posted September 2, 2007 ok so i set up my vhost file to look like this <VirtualHost *:80> DocumentRoot C:/webs ServerName www.mydomain.net </VirtualHost> <VirtualHost *:80> DocumentRoot C:/webs/forum ServerName forum.mydomain.net </VirtualHost> then i restarted apache, i have both www.mydomain.net and forum.mydomain.net pointed to the server ip on godaddy, but forum.mydomain still wont work... what am i doing wrong Thanks Quote Link to comment Share on other sites More sharing options...
trq Posted September 2, 2007 Share Posted September 2, 2007 Have you the line... NameVirtualHost * anywhere? Quote Link to comment Share on other sites More sharing options...
LRgraham14 Posted September 3, 2007 Author Share Posted September 3, 2007 ok ,its working now i had the sub domain part under the wrong section, it had to be under c name in go daddy, i really appreciate all your help! Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.