http://domain.dev not working. WAMP homepage or 403
Posted by: JFrankParnell (---.hsd1.wa.comcast.net)
Date: February 24, 2015 02:15AM

1 - 7, 64
2 - 2.5, 64
3 - 2.49
4 - 5.5.12
5 - 5.6.17
6 - green

I put this in my hosts: 127.0.0.39 travcarrental.dev
and this in my apache conf
Listen 127.0.0.39:80
<VirtualHost 127.0.0.39:80>
DocumentRoot "C:\Users\user\_websites\TravCarRental.com\wwwtest"
ServerName travcarrental.dev
<Directory "C:\Users\user\_websites\TravCarRental.com\wwwtest">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
Allow from all
</Directory>
</VirtualHost>

This has been my MO for years, with an old version of a different wamp stack. If I vist the site: travcarrental.dev, I get the WAMPServer homepage, the same one as [localhost]
Can anyone tell me what I'm doing wrong or point me to a tutorial on how youre doing this (serving domain.dev from an arbitrary dir). It looks like youre sposto put your dir in WAMP's www dir? If I put the wwwtest dir in there, I get 403 forbidden.



Edited 1 time(s). Last edit at 02/24/2015 02:16AM by JFrankParnell.

Options: ReplyQuote
Re: http://domain.dev not working. WAMP homepage or 403
Posted by: RiggsFolly (---.as43234.net)
Date: February 24, 2015 11:05AM

Hi Frank,

1. I dont see the point in using 127.0.0.39, although I would be interested to know why you did that.

2. You are using Apache 2.2 syntax on a Apache 2.4. While its supposed to work if you have the access_compat_module activated in Apache, why not move to the correct Apache 2.4 syntax.


So I would change httpd.conf back to

Listen 0.0.0.0:80
Listen [::0]:80

and 

ServerName localhost:80

Then change your vhost definition to

<VirtualHost *:80>
   DocumentRoot "C:\Users\user\_websites\TravCarRental.com\wwwtest"
   ServerName travcarrental.dev
   <Directory "C:\Users\user\_websites\TravCarRental.com\wwwtest">
      Options FollowSymLinks Indexes
      Require local
   </Directory>
</VirtualHost>

Or if you actually want to allow the universe into your system use

      Require all granted
Instead of `Require local`


There is a sticky post called WAMPServer 2.5 The Homepage, Your Projects Menu and the need for Virtual Hosts which you may find useful.
It has WAMPServer 2.5 in the title but it is and was relevent to using VHOSTS in any version of Apache.

If you feel you are familiar with vhosts you could probably just skim most of it, but look at the section at the bottom called Now if you take this to its logical extension

---------------------------------------------------------------------------------------------
(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: http://domain.dev not working. WAMP homepage or 403
Posted by: JFrankParnell (---.hsd1.wa.comcast.net)
Date: February 24, 2015 05:59PM

1. Re: using 127.0.0.39: I have been in the practice of adding dev sites to 'hosts' in this manner for years and years. I'm sure I got it from some google search, frankly, I have no idea. I have a bunch of ips listed .39,.40,.41 etc with their respective dev sites. And as mentioned, above, my virtual hosts all refer to this ip. Also, in conf, i have a long list of Listen 127.0.0.1,.2,.3 etc etc.

This does not apear to be needed. I am experimenting with just 127.0.0.1 domain.dev in my hosts and VirtualHosts as you and the linked page explain. Seems fine. Less dicking around with ip #s, too!

2. Apache syntax 2.2 vs 2.4. This must have been the main mistake, thank you very much.

I had been using
Options FollowSymLinks Indexes
AllowOverride All
in my <directory> sections, which it seems are still appropriate.

And, the 'Require Local' fixes the main mistake, using the deprecated and obsolete
"Order deny,allow Allow from all"


Thank you, Riggs. I seem to be sorted, here, but welcome any further commentary.

Options: ReplyQuote


Sorry, only registered users may post in this forum.