You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Larry <ra...@lmr.com> on 2006/09/24 02:06:36 UTC

[users@httpd] testing server

Apache 2.0.47, PHP 4.3.4, MySQL 4 something.  All installed on Win XP
Pro SP2, 2 gig mem.  

I am trying to setup a testing server for Dreamweaver 8.  Most of my
work is in subdirectories of C:\Websites, for example
C:\Websites\AgendaTest.  I would like to use Apache with PHP as a
testing server.  I am getting confused between Virtual Hosts and
Aliases.  I thought that adding the lines:

127.0.0.1  Localhost
127.0.0.1  Websites
127.0.0.1  AgendaTest

to Hosts in \Windows\System32\Drivers\etc in combination with virtual
hosts in C:\Program Files\Apache Group\Apache2\conf\httpd.conf would
do it, but I guess not.  

In httpd.conf I set up (at various places)
Servername localhost:80
DocumentRoot "C:/Websites"
<Directory "C:/Websites">
Alias /websites "C:/Websites/"
<Directory "C:/Websites">
	Options Indexes MultiViews
	AllowOverride None
	Order allow,deny
	Allow from all
</Directory>
Alias /AgendaTest/ "C:/Websites/AgendaTest/"
<Directory "C:/Websites/AgendaTest">
	Options Indexes MultiViews
	AllowOverride None
	Order allow,deny
	Allow from all
</Directory>
<VirtualHost *>
	DocumentRoot "C:/Websites"
	ServerName localhost
</VirtualHost>
<VirtualHost *>
	DocumentRoot "C:/Websites/AgendaTest"
	ServerName AgendaTest
</VirtualHost>

What am I screwing up here?

Thanks,
--

Larry
rapp@lmr.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] testing server

Posted by Sander Temme <sc...@apache.org>.
On Sep 23, 2006, at 5:06 PM, Larry wrote:

> What am I screwing up here?

What unexpected result are you seeing?

S.

-- 
sctemme@apache.org            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



Re: [users@httpd] testing server

Posted by Larry <ra...@lmr.com>.
BULLSEYE!!!

Ping worked on all three.  So I said to myself, "Self, he's got to be
spot on, but I don't have a proxy - well I do, the SonicWall TZ-170,
but it's setup to be transparent"  Then I remembered that I also have
Anonymizer, a service I bought long ago to protect myself from web
attacks.  That was it.  As soon as I turned it off, everything worked!
Now I'll try to find a way to exclude those web names.

Thanks so much for sticking with me.  Anonymizer is so transparent,
that I completely forgot about it!

Best,
--

Larry
Email to rapp at lmr dot com

On Mon, 25 Sep 2006 13:58:59 +1200, you wrote (with possible editing):

>Have you tried to see if the hostnames can be resolved correctly?
>
> From a command prompt try to ping or do a host lookup (nslookup or 
>host) on the 3 names specified in the hosts file
>
>ie.
>   ping websites
>
>if this works then check to see if your browser is trying to use a web 
>proxy somewhere
>Turn of your web proxy in the browser or setup an exclusion for those 2 
>domain names to go directly before testing it
>
>
>
>Larry wrote:
>> On Mon, 25 Sep 2006 11:50:15 +1200, you wrote (with possible editing):
>>
>>   
>>> Just for a thought, make the hosts file look something like this:
>>>
>>> 127.0.0.1 localhost websites agendatest
>>>     
>>
>> http://websites/ yields "Proxy Error"
>> http://localhost/ yields "Bad Gateway" 
>>
>>   
>>> note the lowercase
>>>     
>>
>> Yes, I did.
>>
>>   
>>> and also for your apache config make sure you turn on Name based virtual 
>>> hosts 
>>>     
>>
>> I did.
>>
>>   
>>> and use lowercase hostnames.
>>>     
>>
>> that, too.  However, the Document Root says "C:/Websites" 
>> another says "C:/Websites/AgendaTest" both of which are the actual
>> directories except for the "/" instead of "\".
>>
>> I tried using all lowercase there, but it didn't seem to make a
>> difference.  
>>
>>   
>>> read: http://httpd.apache.org/docs/2.0/vhosts/name-based.html
>>> for more info on setting up name based virtual hosts
>>>
>>> Also, the order in which the hosts file gets used in windows 
>>> applications depends on the function to do DNS resolution (there are at 
>>> least 2 and they use a different order with regards to hosts file and 
>>> DNS lookups)
>>>     
>>
>> This is what I think is the problem.  It may be that I have to do a
>> reboot after modifying the hosts file.  I'll try that.
>>
>>   
>>> Finally, you probably won't need the following section in your config
>>>
>>> Alias /AgendaTest/ "C:/Websites/AgendaTest/"
>>>     
>>
>> Ok, I'll eliminate it.
>>
>> Thanks for the help!
>> --
>>
>> Larry
>> Email to rapp at lmr dot com
>>
>>   
>>>
>>>
>>> Larry wrote:
>>>     
>>>> Apache 2.0.47, PHP 4.3.4, MySQL 4 something.  All installed on Win XP
>>>> Pro SP2, 2 gig mem.  
>>>>
>>>> I am trying to setup a testing server for Dreamweaver 8.  Most of my
>>>> work is in subdirectories of C:\Websites, for example
>>>> C:\Websites\AgendaTest.  I would like to use Apache with PHP as a
>>>> testing server.  I am getting confused between Virtual Hosts and
>>>> Aliases.  I thought that adding the lines:
>>>>
>>>> 127.0.0.1  Localhost
>>>> 127.0.0.1  Websites
>>>> 127.0.0.1  AgendaTest
>>>>
>>>> to Hosts in \Windows\System32\Drivers\etc in combination with virtual
>>>> hosts in C:\Program Files\Apache Group\Apache2\conf\httpd.conf would
>>>> do it, but I guess not.  
>>>>
>>>> In httpd.conf I set up (at various places)
>>>> Servername localhost:80
>>>> DocumentRoot "C:/Websites"
>>>> <Directory "C:/Websites">
>>>> Alias /websites "C:/Websites/"
>>>> <Directory "C:/Websites">
>>>> 	Options Indexes MultiViews
>>>> 	AllowOverride None
>>>> 	Order allow,deny
>>>> 	Allow from all
>>>> </Directory>
>>>> Alias /AgendaTest/ "C:/Websites/AgendaTest/"
>>>> <Directory "C:/Websites/AgendaTest">
>>>> 	Options Indexes MultiViews
>>>> 	AllowOverride None
>>>> 	Order allow,deny
>>>> 	Allow from all
>>>> </Directory>
>>>> <VirtualHost *>
>>>> 	DocumentRoot "C:/Websites"
>>>> 	ServerName localhost
>>>> </VirtualHost>
>>>> <VirtualHost *>
>>>> 	DocumentRoot "C:/Websites/AgendaTest"
>>>> 	ServerName AgendaTest
>>>> </VirtualHost>
>>>>
>>>> What am I screwing up here?
>>>>
>>>> Thanks,
>>>> --
>>>>
>>>> Larry
>>>> rapp@lmr.com
>>>>
>>>> ---------------------------------------------------------------------
>>>> The official User-To-User support forum of the Apache HTTP Server Project.
>>>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>>>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>>
>>>>   
>>>>       
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>   

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] testing server

Posted by Gerwin van de Steeg <ge...@vadacom.co.nz>.
Have you tried to see if the hostnames can be resolved correctly?

 From a command prompt try to ping or do a host lookup (nslookup or 
host) on the 3 names specified in the hosts file

ie.
   ping websites

if this works then check to see if your browser is trying to use a web 
proxy somewhere
Turn of your web proxy in the browser or setup an exclusion for those 2 
domain names to go directly before testing it



Larry wrote:
> On Mon, 25 Sep 2006 11:50:15 +1200, you wrote (with possible editing):
>
>   
>> Just for a thought, make the hosts file look something like this:
>>
>> 127.0.0.1 localhost websites agendatest
>>     
>
> http://websites/ yields "Proxy Error"
> http://localhost/ yields "Bad Gateway" 
>
>   
>> note the lowercase
>>     
>
> Yes, I did.
>
>   
>> and also for your apache config make sure you turn on Name based virtual 
>> hosts 
>>     
>
> I did.
>
>   
>> and use lowercase hostnames.
>>     
>
> that, too.  However, the Document Root says "C:/Websites" 
> another says "C:/Websites/AgendaTest" both of which are the actual
> directories except for the "/" instead of "\".
>
> I tried using all lowercase there, but it didn't seem to make a
> difference.  
>
>   
>> read: http://httpd.apache.org/docs/2.0/vhosts/name-based.html
>> for more info on setting up name based virtual hosts
>>
>> Also, the order in which the hosts file gets used in windows 
>> applications depends on the function to do DNS resolution (there are at 
>> least 2 and they use a different order with regards to hosts file and 
>> DNS lookups)
>>     
>
> This is what I think is the problem.  It may be that I have to do a
> reboot after modifying the hosts file.  I'll try that.
>
>   
>> Finally, you probably won't need the following section in your config
>>
>> Alias /AgendaTest/ "C:/Websites/AgendaTest/"
>>     
>
> Ok, I'll eliminate it.
>
> Thanks for the help!
> --
>
> Larry
> Email to rapp at lmr dot com
>
>   
>>
>>
>> Larry wrote:
>>     
>>> Apache 2.0.47, PHP 4.3.4, MySQL 4 something.  All installed on Win XP
>>> Pro SP2, 2 gig mem.  
>>>
>>> I am trying to setup a testing server for Dreamweaver 8.  Most of my
>>> work is in subdirectories of C:\Websites, for example
>>> C:\Websites\AgendaTest.  I would like to use Apache with PHP as a
>>> testing server.  I am getting confused between Virtual Hosts and
>>> Aliases.  I thought that adding the lines:
>>>
>>> 127.0.0.1  Localhost
>>> 127.0.0.1  Websites
>>> 127.0.0.1  AgendaTest
>>>
>>> to Hosts in \Windows\System32\Drivers\etc in combination with virtual
>>> hosts in C:\Program Files\Apache Group\Apache2\conf\httpd.conf would
>>> do it, but I guess not.  
>>>
>>> In httpd.conf I set up (at various places)
>>> Servername localhost:80
>>> DocumentRoot "C:/Websites"
>>> <Directory "C:/Websites">
>>> Alias /websites "C:/Websites/"
>>> <Directory "C:/Websites">
>>> 	Options Indexes MultiViews
>>> 	AllowOverride None
>>> 	Order allow,deny
>>> 	Allow from all
>>> </Directory>
>>> Alias /AgendaTest/ "C:/Websites/AgendaTest/"
>>> <Directory "C:/Websites/AgendaTest">
>>> 	Options Indexes MultiViews
>>> 	AllowOverride None
>>> 	Order allow,deny
>>> 	Allow from all
>>> </Directory>
>>> <VirtualHost *>
>>> 	DocumentRoot "C:/Websites"
>>> 	ServerName localhost
>>> </VirtualHost>
>>> <VirtualHost *>
>>> 	DocumentRoot "C:/Websites/AgendaTest"
>>> 	ServerName AgendaTest
>>> </VirtualHost>
>>>
>>> What am I screwing up here?
>>>
>>> Thanks,
>>> --
>>>
>>> Larry
>>> rapp@lmr.com
>>>
>>> ---------------------------------------------------------------------
>>> The official User-To-User support forum of the Apache HTTP Server Project.
>>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>
>>>   
>>>       
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>   

-- 
Gerwin van de Steeg
Engineer


Vadacom Ltd
W: www.vadacom.co.nz
E: gerwin.van.de.steeg@vadacom.co.nz


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] testing server

Posted by Larry <ra...@lmr.com>.
On Mon, 25 Sep 2006 11:50:15 +1200, you wrote (with possible editing):

>Just for a thought, make the hosts file look something like this:
>
>127.0.0.1 localhost websites agendatest

http://websites/ yields "Proxy Error"
http://localhost/ yields "Bad Gateway" 

>note the lowercase

Yes, I did.

>and also for your apache config make sure you turn on Name based virtual 
>hosts 

I did.

>and use lowercase hostnames.

that, too.  However, the Document Root says "C:/Websites" 
another says "C:/Websites/AgendaTest" both of which are the actual
directories except for the "/" instead of "\".

I tried using all lowercase there, but it didn't seem to make a
difference.  

>
>read: http://httpd.apache.org/docs/2.0/vhosts/name-based.html
>for more info on setting up name based virtual hosts
>
>Also, the order in which the hosts file gets used in windows 
>applications depends on the function to do DNS resolution (there are at 
>least 2 and they use a different order with regards to hosts file and 
>DNS lookups)

This is what I think is the problem.  It may be that I have to do a
reboot after modifying the hosts file.  I'll try that.

>
>Finally, you probably won't need the following section in your config
>
>Alias /AgendaTest/ "C:/Websites/AgendaTest/"

Ok, I'll eliminate it.

Thanks for the help!
--

Larry
Email to rapp at lmr dot com

>
>
>
>
>Larry wrote:
>> Apache 2.0.47, PHP 4.3.4, MySQL 4 something.  All installed on Win XP
>> Pro SP2, 2 gig mem.  
>>
>> I am trying to setup a testing server for Dreamweaver 8.  Most of my
>> work is in subdirectories of C:\Websites, for example
>> C:\Websites\AgendaTest.  I would like to use Apache with PHP as a
>> testing server.  I am getting confused between Virtual Hosts and
>> Aliases.  I thought that adding the lines:
>>
>> 127.0.0.1  Localhost
>> 127.0.0.1  Websites
>> 127.0.0.1  AgendaTest
>>
>> to Hosts in \Windows\System32\Drivers\etc in combination with virtual
>> hosts in C:\Program Files\Apache Group\Apache2\conf\httpd.conf would
>> do it, but I guess not.  
>>
>> In httpd.conf I set up (at various places)
>> Servername localhost:80
>> DocumentRoot "C:/Websites"
>> <Directory "C:/Websites">
>> Alias /websites "C:/Websites/"
>> <Directory "C:/Websites">
>> 	Options Indexes MultiViews
>> 	AllowOverride None
>> 	Order allow,deny
>> 	Allow from all
>> </Directory>
>> Alias /AgendaTest/ "C:/Websites/AgendaTest/"
>> <Directory "C:/Websites/AgendaTest">
>> 	Options Indexes MultiViews
>> 	AllowOverride None
>> 	Order allow,deny
>> 	Allow from all
>> </Directory>
>> <VirtualHost *>
>> 	DocumentRoot "C:/Websites"
>> 	ServerName localhost
>> </VirtualHost>
>> <VirtualHost *>
>> 	DocumentRoot "C:/Websites/AgendaTest"
>> 	ServerName AgendaTest
>> </VirtualHost>
>>
>> What am I screwing up here?
>>
>> Thanks,
>> --
>>
>> Larry
>> rapp@lmr.com
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>   

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] testing server

Posted by Gerwin van de Steeg <ge...@vadacom.co.nz>.
Just for a thought, make the hosts file look something like this:

127.0.0.1 localhost websites agendatest

note the lowercase

and also for your apache config make sure you turn on Name based virtual 
hosts and use lowercase hostnames.

read: http://httpd.apache.org/docs/2.0/vhosts/name-based.html
for more info on setting up name based virtual hosts

Also, the order in which the hosts file gets used in windows 
applications depends on the function to do DNS resolution (there are at 
least 2 and they use a different order with regards to hosts file and 
DNS lookups)

Finally, you probably won't need the following section in your config

Alias /AgendaTest/ "C:/Websites/AgendaTest/"




Larry wrote:
> Apache 2.0.47, PHP 4.3.4, MySQL 4 something.  All installed on Win XP
> Pro SP2, 2 gig mem.  
>
> I am trying to setup a testing server for Dreamweaver 8.  Most of my
> work is in subdirectories of C:\Websites, for example
> C:\Websites\AgendaTest.  I would like to use Apache with PHP as a
> testing server.  I am getting confused between Virtual Hosts and
> Aliases.  I thought that adding the lines:
>
> 127.0.0.1  Localhost
> 127.0.0.1  Websites
> 127.0.0.1  AgendaTest
>
> to Hosts in \Windows\System32\Drivers\etc in combination with virtual
> hosts in C:\Program Files\Apache Group\Apache2\conf\httpd.conf would
> do it, but I guess not.  
>
> In httpd.conf I set up (at various places)
> Servername localhost:80
> DocumentRoot "C:/Websites"
> <Directory "C:/Websites">
> Alias /websites "C:/Websites/"
> <Directory "C:/Websites">
> 	Options Indexes MultiViews
> 	AllowOverride None
> 	Order allow,deny
> 	Allow from all
> </Directory>
> Alias /AgendaTest/ "C:/Websites/AgendaTest/"
> <Directory "C:/Websites/AgendaTest">
> 	Options Indexes MultiViews
> 	AllowOverride None
> 	Order allow,deny
> 	Allow from all
> </Directory>
> <VirtualHost *>
> 	DocumentRoot "C:/Websites"
> 	ServerName localhost
> </VirtualHost>
> <VirtualHost *>
> 	DocumentRoot "C:/Websites/AgendaTest"
> 	ServerName AgendaTest
> </VirtualHost>
>
> What am I screwing up here?
>
> Thanks,
> --
>
> Larry
> rapp@lmr.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>   

-- 
Gerwin van de Steeg
Engineer


Vadacom Ltd
W: www.vadacom.co.nz
E: gerwin.van.de.steeg@vadacom.co.nz


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org