 |
|
 |
|
Next: IIS - windows 2003 server
|
| Author |
Message |
External

Since: Mar 07, 2005 Posts: 6
|
(Msg. 1) Posted: Wed Mar 09, 2005 5:35 am
Post subject: Virtual Hosting question Archived from groups: alt>apache>configuration (more info?)
|
|
|
Hello again,
I am running Apache on an XP computer as a server. I have two domains
pointing at my IP address. It doesn't matter which address I type in from a
browser, only "company1" comes up. The server is behind a hardware
firewall, and is assigned 192.168.0.2. I suspect this is easy, but I am
just learning Apache configuration.
Here is what I have in the hppd.conf:
NameVirtualHost *:80
<VirtualHost 192.168.0.2>
Servername www.company1.com
DocumentRoot "c:/program files/Apache Group/Apache2/htdocs/usr/Company1"
</VirtualHost>
<VirtualHost 192.168.0.2>
Servername www.company2.com
DocumentRoot "c:/program files/Apache Group/Apache2/htdocs/usr/Company2"
</VirtualHost>
Thanks in advance,
Jim >> Stay informed about: Virtual Hosting question |
|
| Back to top |
|
 |  |
External

Since: Nov 03, 2003 Posts: 2907
|
(Msg. 2) Posted: Wed Mar 09, 2005 6:35 am
Post subject: Re: Virtual Hosting question [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
|
|
| Back to top |
|
 |  |
External

Since: Jul 21, 2004 Posts: 8
|
(Msg. 3) Posted: Wed Mar 09, 2005 9:26 am
Post subject: Re: Virtual Hosting question [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
James Warren wrote:
> Hello again,
> I am running Apache on an XP computer as a server. I have two domains
> pointing at my IP address. It doesn't matter which address I type in from a
> browser, only "company1" comes up. The server is behind a hardware
> firewall, and is assigned 192.168.0.2. I suspect this is easy, but I am
> just learning Apache configuration.
I had a similar problem when switching from Apache 1.3.x to 2.0.x. I
don't know if this is the correct way to do it but it works for me. I
added a dummy domain in as the default using the same document root as
my first real domain. I had more than two domains going and the first
worked (default), the second gave me the default, the rest worked. So
now, the (dummy) default is never used, the second gives me the default,
and the rest work.
--
Stan McCann "Uncle Pirate" <a style='text-decoration: underline;' href="http://stanmccann.us/pirate.html" target="_blank">http://stanmccann.us/pirate.html</a>
Webmaster/Computer Center Manager, NMSU at Alamogordo
Coordinator, Tularosa Basin Chapter, ABATE of NM; AMA#758681; COBB
'94 1500 Vulcan (now wrecked)  <a style='text-decoration: underline;' href="http://motorcyclefun.org/Dcp_2068c.jpg" target="_blank">http://motorcyclefun.org/Dcp_2068c.jpg</a>
A zest for living must include a willingness to die. - R.A. Heinlein<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Virtual Hosting question |
|
| Back to top |
|
 |  |
External

Since: Jan 03, 2005 Posts: 14
|
(Msg. 4) Posted: Wed Mar 09, 2005 12:35 pm
Post subject: Re: Virtual Hosting question [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"James Warren" <warren.james.d.TakeThisOut@att.net> wrote in
news:GNzXd.117361$Th1.63295@bgtnsc04-news.ops.worldnet.att.net:
> Hello again,
> I am running Apache on an XP computer as a server. I have two domains
> pointing at my IP address. It doesn't matter which address I type in
> from a browser, only "company1" comes up. The server is behind a
> hardware firewall, and is assigned 192.168.0.2. I suspect this is
> easy, but I am just learning Apache configuration.
>
>
> Here is what I have in the hppd.conf:
>
> NameVirtualHost *:80
> <VirtualHost 192.168.0.2>
<font color=purple> > Servername <a style='text-decoration: underline;' href="http://www.company1.com</font" target="_blank">www.company1.com</font</a>>
> DocumentRoot "c:/program files/Apache
> Group/Apache2/htdocs/usr/Company1"
> </VirtualHost>
>
> <VirtualHost 192.168.0.2>
<font color=purple> > Servername <a style='text-decoration: underline;' href="http://www.company2.com</font" target="_blank">www.company2.com</font</a>>
> DocumentRoot "c:/program files/Apache
> Group/Apache2/htdocs/usr/Company2"
> </VirtualHost>
>
As noted, drop the IP address. Begin each <VirtualHost> with
<VirtualHost *:80>
Then, turn off the service, open a command line window, and start Apache
manually. This way, you can see any error messages generated.
--
Terry Austin
<a style='text-decoration: underline;' href="http://www.hyperbooks.com" target="_blank">www.hyperbooks.com</a>
Campaign Cartographer now available<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Virtual Hosting question |
|
| Back to top |
|
 |  |
External

Since: Mar 09, 2005 Posts: 1
|
(Msg. 5) Posted: Wed Mar 09, 2005 1:35 pm
Post subject: Re: Virtual Hosting question [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Wed, 09 Mar 2005 09:59:02 GMT, "James Warren" <warren.james.d.RemoveThis@att.net> wrote:
>Hello again,
>I am running Apache on an XP computer as a server. I have two domains
>pointing at my IP address. It doesn't matter which address I type in from a
>browser, only "company1" comes up. The server is behind a hardware
>firewall, and is assigned 192.168.0.2. I suspect this is easy, but I am
>just learning Apache configuration.
>
>
>Here is what I have in the hppd.conf:
>
>NameVirtualHost *:80
><VirtualHost 192.168.0.2>
<font color=purple> > Servername <a style='text-decoration: underline;' href="http://www.company1.com</font" target="_blank">www.company1.com</font</a>>
> DocumentRoot "c:/program files/Apache Group/Apache2/htdocs/usr/Company1"
></VirtualHost>
>
><VirtualHost 192.168.0.2>
<font color=purple> > Servername <a style='text-decoration: underline;' href="http://www.company2.com</font" target="_blank">www.company2.com</font</a>>
> DocumentRoot "c:/program files/Apache Group/Apache2/htdocs/usr/Company2"
></VirtualHost>
>
>Thanks in advance,
>Jim
>
Here are VirtualHost entries which should work:
<VirtualHost *:80 *:443>
DocumentRoot "c:/program files/Apache Group/Apache2/htdocs/usr/Company1"
ServerName company1.com
ServerAlias *.company1.com
CustomLog logs/company1_access_log combined
</VirtualHost>
<VirtualHost *:80 *:443>
DocumentRoot "c:/program files/Apache Group/Apache2/htdocs/usr/Company2"
ServerName company2.com
ServerAlias *.company2.com
CustomLog logs/company2_access_log combined
</VirtualHost>
--
Brendan<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Virtual Hosting question |
|
| Back to top |
|
 |  |
External

Since: Nov 29, 2004 Posts: 20
|
(Msg. 6) Posted: Wed Mar 09, 2005 1:35 pm
Post subject: Re: Virtual Hosting question [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
BWK wrote:
> On Wed, 09 Mar 2005 09:59:02 GMT, "James Warren" <warren.james.d.TakeThisOut@att.net> wrote:
>
>
>>Hello again,
>>I am running Apache on an XP computer as a server. I have two domains
>>pointing at my IP address. It doesn't matter which address I type in from a
>>browser, only "company1" comes up. The server is behind a hardware
>>firewall, and is assigned 192.168.0.2. I suspect this is easy, but I am
>>just learning Apache configuration.
>>
>>
>>Here is what I have in the hppd.conf:
>>
>>NameVirtualHost *:80
>><VirtualHost 192.168.0.2>
<font color=green> >> Servername <a style='text-decoration: underline;' href="http://www.company1.com</font" target="_blank">www.company1.com</font</a>>
>> DocumentRoot "c:/program files/Apache Group/Apache2/htdocs/usr/Company1"
>></VirtualHost>
>>
>><VirtualHost 192.168.0.2>
<font color=green> >> Servername <a style='text-decoration: underline;' href="http://www.company2.com</font" target="_blank">www.company2.com</font</a>>
>> DocumentRoot "c:/program files/Apache Group/Apache2/htdocs/usr/Company2"
>></VirtualHost>
>>
>>Thanks in advance,
>>Jim
>>
>
>
> Here are VirtualHost entries which should work:
>
> <VirtualHost *:80 *:443>
> DocumentRoot "c:/program files/Apache Group/Apache2/htdocs/usr/Company1"
> ServerName company1.com
> ServerAlias *.company1.com
> CustomLog logs/company1_access_log combined
> </VirtualHost>
>
> <VirtualHost *:80 *:443>
> DocumentRoot "c:/program files/Apache Group/Apache2/htdocs/usr/Company2"
> ServerName company2.com
> ServerAlias *.company2.com
> CustomLog logs/company2_access_log combined
> </VirtualHost>
>
> --
> Brendan
The only thing I will suggest is that the
ServerAlias should be <a style='text-decoration: underline;' href="http://www.company1.com" target="_blank">www.company1.com</a> not *.company1 or company2.com
the reason being is that if say I wanted sub virtual domains the above
would answer to anything, which might not be the desired effect.
ie: employees.company1.com
repair.company1.com
I wuld be sure in this case it would send the user to an undesired
directory.
Just a thought<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Virtual Hosting question |
|
| Back to top |
|
 |  |
External

Since: Mar 07, 2005 Posts: 6
|
(Msg. 7) Posted: Wed Mar 09, 2005 2:35 pm
Post subject: Re: Virtual Hosting question [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Thank you all very much, I truely appreciate the response. I'll make the
recommended changes and get back with you on the result.
Regards,
Jim
"David" <dwmoar RemoveThis @findmoore.net> wrote in message
news:y_ednbuIvJWYobLfRVn-jg@megapath.net...
> BWK wrote:
>> On Wed, 09 Mar 2005 09:59:02 GMT, "James Warren" <warren.james.d RemoveThis @att.net>
>> wrote:
>>
>>
>>>Hello again,
>>>I am running Apache on an XP computer as a server. I have two domains
>>>pointing at my IP address. It doesn't matter which address I type in
>>>from a browser, only "company1" comes up. The server is behind a
>>>hardware firewall, and is assigned 192.168.0.2. I suspect this is easy,
>>>but I am just learning Apache configuration.
>>>
>>>
>>>Here is what I have in the hppd.conf:
>>>
>>>NameVirtualHost *:80
>>><VirtualHost 192.168.0.2>
<font color=brown> >>> Servername <a style='text-decoration: underline;' href="http://www.company1.com</font" target="_blank">www.company1.com</font</a>>
>>> DocumentRoot "c:/program files/Apache
>>> Group/Apache2/htdocs/usr/Company1"
>>></VirtualHost>
>>>
>>><VirtualHost 192.168.0.2>
<font color=brown> >>> Servername <a style='text-decoration: underline;' href="http://www.company2.com</font" target="_blank">www.company2.com</font</a>>
>>> DocumentRoot "c:/program files/Apache
>>> Group/Apache2/htdocs/usr/Company2"
>>></VirtualHost>
>>>
>>>Thanks in advance,
>>>Jim
>>
>>
>> Here are VirtualHost entries which should work:
>>
>> <VirtualHost *:80 *:443>
>> DocumentRoot "c:/program files/Apache
>> Group/Apache2/htdocs/usr/Company1"
>> ServerName company1.com
>> ServerAlias *.company1.com
>> CustomLog logs/company1_access_log combined
>> </VirtualHost>
>>
>> <VirtualHost *:80 *:443>
>> DocumentRoot "c:/program files/Apache
>> Group/Apache2/htdocs/usr/Company2"
>> ServerName company2.com
>> ServerAlias *.company2.com
>> CustomLog logs/company2_access_log combined
>> </VirtualHost>
>>
>> --
>> Brendan
>
>
> The only thing I will suggest is that the
> ServerAlias should be <a style='text-decoration: underline;' href="http://www.company1.com" target="_blank">www.company1.com</a> not *.company1 or company2.com
>
> the reason being is that if say I wanted sub virtual domains the above
> would answer to anything, which might not be the desired effect.
>
> ie: employees.company1.com
> repair.company1.com
>
> I wuld be sure in this case it would send the user to an undesired
> directory.
>
> Just a thought<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Virtual Hosting question |
|
| Back to top |
|
 |  |
External

Since: Mar 07, 2005 Posts: 6
|
(Msg. 8) Posted: Wed Mar 09, 2005 2:35 pm
Post subject: Re: Virtual Hosting question [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
You guys are awsome! Problem solved, and we are off and running - er -
VirtualHosting.
God Bless,
Jim
"BWK" <cyclorider1.DeleteThis@yahoo.com> wrote in message
news:ludu219plds42c8c8g2i1gts6lash0m7kg@4ax.com...
> On Wed, 09 Mar 2005 09:59:02 GMT, "James Warren" <warren.james.d.DeleteThis@att.net>
> wrote:
>
>>Hello again,
>>I am running Apache on an XP computer as a server. I have two domains
>>pointing at my IP address. It doesn't matter which address I type in from
>>a
>>browser, only "company1" comes up. The server is behind a hardware
>>firewall, and is assigned 192.168.0.2. I suspect this is easy, but I am
>>just learning Apache configuration.
>>
>>
>>Here is what I have in the hppd.conf:
>>
>>NameVirtualHost *:80
>><VirtualHost 192.168.0.2>
<font color=green> >> Servername <a style='text-decoration: underline;' href="http://www.company1.com</font" target="_blank">www.company1.com</font</a>>
>> DocumentRoot "c:/program files/Apache
>> Group/Apache2/htdocs/usr/Company1"
>></VirtualHost>
>>
>><VirtualHost 192.168.0.2>
<font color=green> >> Servername <a style='text-decoration: underline;' href="http://www.company2.com</font" target="_blank">www.company2.com</font</a>>
>> DocumentRoot "c:/program files/Apache
>> Group/Apache2/htdocs/usr/Company2"
>></VirtualHost>
>>
>>Thanks in advance,
>>Jim
>>
>
> Here are VirtualHost entries which should work:
>
> <VirtualHost *:80 *:443>
> DocumentRoot "c:/program files/Apache
> Group/Apache2/htdocs/usr/Company1"
> ServerName company1.com
> ServerAlias *.company1.com
> CustomLog logs/company1_access_log combined
> </VirtualHost>
>
> <VirtualHost *:80 *:443>
> DocumentRoot "c:/program files/Apache
> Group/Apache2/htdocs/usr/Company2"
> ServerName company2.com
> ServerAlias *.company2.com
> CustomLog logs/company2_access_log combined
> </VirtualHost>
>
> --
> Brendan<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Virtual Hosting question |
|
| Back to top |
|
 |  |
| Related Topics: | Apache Virtual Hosting - Two part question - I have an apache 2 server right now which is serving webpages out of the main server document root for the servername configured in the httpd.conf file. I want to add virtual hosting to the server on the same IP address but it seems that when I enable..
APACHE NAME BASED VIRTUAL HOSTING QUESTION - INORDER TO USE NAMED BASED VIRTUAL HOSTING DO YOU NEED TO RUN A NAMESERVER ALSO. IF SO IS THERE ANY EASY TO UNDERSTAND INFO ON THE NAME SERVER ASPECT OF IT. IN THE PAST I RAN AN OLDER VERSION OF APACHE AND THE VIRTUAL HOSTING INFO WAS STORED IN THE..
virtual hosting - I have Apache 2.0.48 (Win32) XP and I would like to know how to test the virtual host on my PC. What I am trying to do is setup Apache as a virtual host only so that I can run and development Perl CGI code. Thanks, Jerry
virtual hosting - I am trying to host 3 domains, when I browse to each site it is only displaying the first site as detailed in the VirtualHost Help appreciated -- Mcploppy © { Remove both MyShoes to email me} { Homepage: http://tinyurl.com/bbel } { Local Radio:..
Virtual hosting - I've setup two named base hosting. The main site under var/www/html and the other /home/public_html. The main site loads quicker than the site under /home is this normal? Both sites contain the same amount of space. Badboy |
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
 |
|
|