Virtual Host, 1 works, another doesn't
Posted by: dzedward (---.dc.res.rr.com)
Date: March 08, 2008 03:45AM

I've set up 2 virtual hosts, and now there's something funky going on. I followed this tutorial by a frequent poster here [guides.jlbn.net]. My domain is www.flashgods.org. I'm attempting to set up forums.flashgods.org and blog.flashgods.org. forums.flashgods.org is the working VH, but blog.flashgods.org won't re-direct. I've set it up exactly the same as the forums one, but for some reason, it doesn't work. Any help is appreciated, I will make any files available that are necessary. Thanks.

Hosts file:

127.0.0.1 localhost

127.0.0.1 www.flashgods.org

127.0.0.1 forums.flashgods.org
127.0.0.1 blog.flashgods.org

httpd-vhost.conf:

NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost *:80>
ServerName www.flashgods.org
ServerAlias flashgods.org flashgods
DocumentRoot C:/wamp/www
ErrorLog C:/wamp/www/logs/error.log
CustomLog C:/wamp/www/logs/access.log common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin dzedward@gmail.com
DocumentRoot C:/wamp/www/forums
ServerName forums.flashgods.org
ServerAlias forums
ErrorLog C:/wamp/www/forums/logs/error.log
CustomLog C:/wamp/www/forums/logs/access.log common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin dzedward@gmail.com
DocumentRoot C:/wamp/www/blog
ServerName blog.flashgods.org
ServerAlias blog
ErrorLog C:/wamp/www/blog/logs/error.log
CustomLog C:/wamp/www/blog/logs/access.log common
</VirtualHost>

<VirtualHost *:80>
ServerName localhost
DocumentRoot C:/wamp/www
ErrorLog C:/wamp/www/logs/error.log
CustomLog C:/wamp/www/logs/access.log common
</VirtualHost>

Options: ReplyQuote
Re: Virtual Host, 1 works, another doesn't
Posted by: dzedward (---.dc.res.rr.com)
Date: March 08, 2008 03:53AM

Apparently both dont work, when testing from outside my server, both show up as Server Not Found. Locally, what happens is stated above. I'm using dyndns to point the domain to my IP. [www.flashgods.org] [www.flashgods.org] both work

Options: ReplyQuote
Re: Virtual Host, 1 works, another doesn't
Posted by: yfastud (Moderator)
Date: March 08, 2008 04:35AM

The question is did you setup DNS for forums.flashgods.org and blog.flashgods.org yet? If not, of course they will NOT work worldwide as I've already mentioned in my guide

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Virtual Host, 1 works, another doesn't
Posted by: dzedward (---.dc.res.rr.com)
Date: March 08, 2008 04:36AM

So I need to add both those to dyndns?

Options: ReplyQuote
Re: Virtual Host, 1 works, another doesn't
Posted by: yfastud (Moderator)
Date: March 08, 2008 04:39AM


Options: ReplyQuote
Re: Virtual Host, 1 works, another doesn't
Posted by: dzedward (---.dc.res.rr.com)
Date: March 08, 2008 04:41AM

as a new custom dns or a Alias (CNAME) Records

Options: ReplyQuote
Re: Virtual Host, 1 works, another doesn't
Posted by: yfastud (Moderator)
Date: March 08, 2008 05:23PM


Options: ReplyQuote
Re: Virtual Host, 1 works, another doesn't
Posted by: dzedward (---.dc.res.rr.com)
Date: March 08, 2008 05:26PM

I dont have an option to add "A-Record" via dyndns...

Options: ReplyQuote
Re: Virtual Host, 1 works, another doesn't
Posted by: dzedward (---.dc.res.rr.com)
Date: March 08, 2008 05:38PM

well, forums.flashgods.org works now. but still, blog.flashgods.org just directs to the root. Any Ideas?

Options: ReplyQuote
Re: Virtual Host, 1 works, another doesn't
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: March 08, 2008 05:51PM

did u add both to ur hosts files. and how did u write them

Options: ReplyQuote
Re: Virtual Host, 1 works, another doesn't
Posted by: dzedward (---.dc.res.rr.com)
Date: March 08, 2008 05:53PM

<VirtualHost *:80>
ServerAdmin dzedward@gmail.com
DocumentRoot C:/wamp/www/forums
ServerName forums.flashgods.org
ServerAlias forums
ErrorLog C:/wamp/www/forums/logs/error.log
CustomLog C:/wamp/www/forums/logs/access.log common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin dzedward@gmail.com
DocumentRoot C:/wamp/www/blog
ServerName blog.flashgods.org
ServerAlias blog
ErrorLog C:/wamp/www/blog/logs/error.log
CustomLog C:/wamp/www/blog/logs/access.log common
</VirtualHost>

Options: ReplyQuote
Re: Virtual Host, 1 works, another doesn't
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: March 08, 2008 05:56PM

no ur hosts file.



in windows/system32/drivers/etc/hosts


need to add the lines

127.0.0.1 blog.flashgods.org
127.0.0.1 forums.flashgods.org

Options: ReplyQuote
Re: Virtual Host, 1 works, another doesn't
Posted by: dzedward (---.dc.res.rr.com)
Date: March 08, 2008 05:57PM

127.0.0.1 localhost

127.0.0.1 www.flashgods.org

127.0.0.1 forums.flashgods.org
127.0.0.1 blog.flashgods.org

Options: ReplyQuote
Re: Virtual Host, 1 works, another doesn't
Posted by: yfastud (Moderator)
Date: March 08, 2008 06:10PM

@ stevenmartin99
If you add to host file like that then you will confuse if you access your sites w/i LAN or worldwide; btw, if I'm not wrong, he's already setup local domains forums and blog to access w/i LAN

@ dzedward
When you have full DNS privilege, you will be able to manage

A Record
MX Record
CNAME
WebForward
MailForward
WebPark
...

Check w/ your host how to add A Record; If you don't have full dns privilege, then sign up for some free such as famous zoneedit which I'm using

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Virtual Host, 1 works, another doesn't
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: March 08, 2008 06:14PM

NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.steven.com
ServerAlias steven.com steven
DocumentRoot C:/wamp/www/domain
ErrorLog C:/wamp/www/domain/logs/error.log
CustomLog C:/wamp/www/domain/logs/access.log common
</VirtualHost>


<VirtualHost *:80>
ServerName sub1.steven.com
ServerAlias sub1
DocumentRoot C:/wamp/www/sub1
ErrorLog C:/wamp/www/sub1/logs/error.log
CustomLog C:/wamp/www/sub1/logs/access.log common
</VirtualHost>

<VirtualHost *:80>
ServerName sub2.steven.com
ServerAlias sub2
DocumentRoot C:/wamp/www/sub2
ErrorLog C:/wamp/www/sub2/logs/error.log
CustomLog C:/wamp/www/sub2/logs/access.log common
</VirtualHost>





change wat u need and it should work
this is wat i use and it works

Options: ReplyQuote
Re: Virtual Host, 1 works, another doesn't
Posted by: dzedward (---.dc.res.rr.com)
Date: March 08, 2008 06:18PM

These are the options I have for my "zones"
[flashgods.org] (screenshot)

These are the three "zones" I have set-up
[flashgods.org] (screenshot)

Options: ReplyQuote
Re: Virtual Host, 1 works, another doesn't
Posted by: yfastud (Moderator)
Date: March 08, 2008 07:09PM

As seen in first screenshot, that is A-record and you need to add 2 more for your forums and blog

I'm not quite sure about DDNS, but I guess they're using the same term and in zoneedit, each zone is 1 domain, and you want to create 2 sub-domains from 1 domain, so from screenshot 2, you should take out those 2 zone forums and blog; then add a-record for those 2 in zone 1

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Virtual Host, 1 works, another doesn't
Posted by: dzedward (---.dc.res.rr.com)
Date: March 09, 2008 03:26AM

Ok, now both forums and blog are A-records of flashgods.org. forums.flashgods.org works, but blog.flashgods.org only directs to www.flashgods.org. Any ideas?

Options: ReplyQuote


Sorry, only registered users may post in this forum.