Need VHOST HELP!
Posted by: Sarabveer (---.nwrknj.east.verizon.net)
Date: September 02, 2014 05:51PM

Windows 7 Ultimate SP1 64bit
Wamp 2.5 64bit
Apache(Win64) 2.4.9
MySQL 5.6.17
PHP 5.5.12
OpenSSL 1.0.1g

Wamp Icon: Green

Hi, I am trying to get the vhosts file working. I have 3 hosts. The First one is my main site (www.v33r.cf), The Second one is my mobile site (m.v33r.cf), and the third is a SourceMod plugin compiler. (spider.v33r.cf)

My Problem is that the 3rd one is not working, the 2nd one won't work unless your on a mobile device. (I set that way, its fine). But when I type spider.v33r.cf, it goes to the main site, but if I type m.v33r.cf, it goes to my Mobile Site (I goes to my Main site if your on Desktop). I tried spider.v33r.cf on my phone, but same thing happens.

So basically, the 1rst and 2nd work, but the third one won't.

Here is my vhosts config:

<VirtualHost *:80>
ServerName v33r.cf
ServerAlias www.v33r.cf
DocumentRoot "C:\wamp\www"
ErrorLog "logs\errors.log"
CustomLog "logs\access.log" common
Redirect permanent / [www.v33r.cf]
</VirtualHost>

<VirtualHost *:80>
ServerName spider.v33r.cf
ServerAlias spider.v33r.cf
DocumentRoot C:\wamp\vhosts\spider
ErrorLog "logs\spider_errors.log"
CustomLog "logs\spider_access.log" common
</VirtualHost>

<VirtualHost *:80>
ServerName m.v33r.cf
ServerAlias m.v33r.cf
DocumentRoot C:\wamp\vhosts\mobile
ErrorLog "logs\m_errors.log"
CustomLog "logs\m_access.log" common
</VirtualHost>



Edited 1 time(s). Last edit at 09/02/2014 07:41PM by Sarabveer.

Options: ReplyQuote
Re: Need VHOST HELP!
Posted by: Sarabveer (---.nwrknj.east.verizon.net)
Date: September 02, 2014 10:05PM

Anyone?

Options: ReplyQuote
Re: Need VHOST HELP!
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: September 03, 2014 01:18AM

What have you got in your c:\windows\system32\drivers\etc\hosts file?

Also read this for help on setting up VHOSTS WAMPServer 2.5 The Homepage, Your Projects Menu and the need for Virtual Hosts

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Need VHOST HELP!
Posted by: Sarabveer (---.nwrknj.east.verizon.net)
Date: September 03, 2014 01:21AM

I have the default hosts file, with localhost as the only entry.

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost

127.0.0.1 localhost

Options: ReplyQuote
Re: Need VHOST HELP!
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: September 03, 2014 01:29AM

You need an entry for each VHOST in here also

127.0.0.1 localhost m.v33r.cf v33r.cf spider.v33r.cf
::1 localhost m.v33r.cf v33r.cf spider.v33r.cf

Read the post I gave you a link to as your VHOST definition also need some work. Its all documented in that post.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Need VHOST HELP!
Posted by: Sarabveer (---.nwrknj.east.verizon.net)
Date: September 03, 2014 02:06AM

RiggsFolly Wrote:
-------------------------------------------------------
> You need an entry for each VHOST in here also
>
>
> 127.0.0.1 localhost m.v33r.cf v33r.cf
> spider.v33r.cf
> ::1 localhost m.v33r.cf v33r.cf spider.v33r.cf
>
>
> Read the post I gave you a link to as your VHOST
> definition also need some work. Its all documented
> in that post.


I already have my DNS set up with Cloudflare, so I don't need the hosts file set up. And m.v33r.cf works, why doesn't spider.v33r.cf?

Also, I have turned off CloudFlare protection.



Edited 1 time(s). Last edit at 09/03/2014 02:30AM by Sarabveer.

Options: ReplyQuote
Re: Need VHOST HELP!
Posted by: Sarabveer (---.nwrknj.east.verizon.net)
Date: September 03, 2014 02:57AM

For Some Reason, It Randomly started worked, no changes to the config. Weird, maybe it just takes time I guess.

Options: ReplyQuote


Sorry, only registered users may post in this forum.