Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apache 2.2 VirtualHosts not working on Windows Vista |
|
Author |
|
josequinonesii
Joined: 13 Aug 2009 Posts: 3
|
Posted: Thu 13 Aug '09 21:05 Post subject: Apache 2.2 VirtualHosts not working on Windows Vista |
|
|
I've searched, I've read, I've tested and re-read numerous post but to no avail yet...
Quite simply, the settings I've applied to my httpd.conf, httpd-vhost.conf and my hosts files simply does not work. Please review my work and let me know if you see that one little thing that is throwing me for a loop.
WINDOWS HOST FILE
Code: |
# Copyright (c) 1993-2006 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
127.0.0.1 localhost
::1 localhost
127.0.0.1:8080 flammerpr
127.0.0.1:8080 testapache
|
HTTPD-VHOST.CONF FILE
Code: |
<Directory C:/Users/josequinonesii/Websites>
Order Deny,Allow
Allow from all
</Directory>
NameVirtualHost 127.0.0.1:8080
<VirtualHost 127.0.0.1:8080>
ServerAdmin jose.quinonesii@gmail.com
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
ServerPath "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
ServerName testapache
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>
<VirtualHost 127.0.0.1:8080>
ServerAdmin webmaster@gmail.com
DocumentRoot "C:/Users/josequinonesii/Websites/flammerpr.com"
ServerPath "C:/Users/josequinonesii/Websites/flammerpr.com"
ServerName flammerpr
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>
|
HTTPD.CONF FILE
Highlights httpd.conf file can be see at
http://pastebin.org/8849
Mod note: I removed all unneeded stuff. Please do not post the whole config or use pastebin.org
Last edited by josequinonesii on Thu 13 Aug '09 22:22; edited 1 time in total |
|
Back to top |
|
paranid
Joined: 02 Mar 2009 Posts: 11
|
Posted: Thu 13 Aug '09 22:17 Post subject: Re: Apache 2.2 VirtualHosts not working on Windows Vista |
|
|
I am not sure what the ServerPath directive should do here, but it should be a URL-path not a directory-path. Try to comment it out.
josequinonesii wrote: |
httpd-vhost.conf
Code: |
ServerPath "C:/Users/josequinonesii/Websites/flammerpr.com"
ServerPath "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
|
|
|
|
Back to top |
|
josequinonesii
Joined: 13 Aug 2009 Posts: 3
|
Posted: Thu 13 Aug '09 22:26 Post subject: |
|
|
thanks for the reply.
I removed that segment of code, restarted my apache instance and neither site responded. |
|
Back to top |
|
paranid
Joined: 02 Mar 2009 Posts: 11
|
Posted: Thu 13 Aug '09 22:53 Post subject: |
|
|
Secondly, I am not sure, if the hosts file may contain something like ip-adress:port hostname(s).
So, try this
Code: |
127.0.0.1 flammerpr
127.0.0.1 testapache
|
|
|
Back to top |
|
josequinonesii
Joined: 13 Aug 2009 Posts: 3
|
Posted: Thu 13 Aug '09 23:01 Post subject: We have a solution!!! |
|
|
The port in the host name was causing the issue. Apparently, I started mixing my solutions from using port updates for VirtualHosts to Simple DNS to mucking with the Windows hosts file.
Thank you very much for pulling me out of the sea weed! |
|
Back to top |
|
|
|
|
|
|