Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 2nd, 2001, 02:38 AM
Datamike's Avatar
Datamike Datamike is offline
Web Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2001
Location: Finland
Posts: 719 Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 27 m 33 sec
Reputation Power: 9
Multible domains

Hi people

I'm running Apache on my home machine, without internet connection. I'm trying to set up domains on it. My OS is Windows ME. I ran a test a few months back when I defined an IP 127.0.0.1 to my host file in the Windows dir. Then I used a virtual host directive in the apache conf and got it work. The problem came up when I tried to set multible domains. Do you guys have any idea on how I could accomblish this?
__________________
-- Tomi Kaistila
-- Developer's Journal

The more you learn, the more you know.
The more you know, the more you forget.
The more you forget, the less you know.

Reply With Quote
  #2  
Old November 2nd, 2001, 03:17 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Put another FQDN on the same line like so:

127.0.0.1 default.domain.com virtual.domain.com

Reply With Quote
  #3  
Old November 2nd, 2001, 04:09 AM
Datamike's Avatar
Datamike Datamike is offline
Web Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2001
Location: Finland
Posts: 719 Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 27 m 33 sec
Reputation Power: 9
Thumbs up Gratitude

Thanks, I'll try that today...

Reply With Quote
  #4  
Old November 5th, 2001, 01:07 AM
Datamike's Avatar
Datamike Datamike is offline
Web Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2001
Location: Finland
Posts: 719 Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 27 m 33 sec
Reputation Power: 9
Exclamation Apache complaining...

freebsd: It works, I can run two domains that way but the apache complains and throws a warning at me for both virtual hosts I have there, everytime I start it. Obviously it's not pleased with the set.

Is there a way of doing this, that would also please my Apache?

Reply With Quote
  #5  
Old November 5th, 2001, 01:20 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Show us the unedited error message as well as your <VirtualHost> configuration.

Reply With Quote
  #6  
Old November 7th, 2001, 01:26 AM
Datamike's Avatar
Datamike Datamike is offline
Web Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2001
Location: Finland
Posts: 719 Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 27 m 33 sec
Reputation Power: 9
Here we go. This is the warning message that apache displays every time I start it.

---------
[Sun Nov 04 11:30:41 2001] [warn] VirtualHost 127.0.0.1:80 overlaps with VirtualHost 127.0.0.1:80, the first has precedence, perhaps you need a NameVirtualHost directive
---------

Here's my Virtual Host configurations:

---------
<VirtualHost 127.0.0.1:80>
ServerAdmin webmaster@datamike.org
DocumentRoot "D:\apache\htdocs\datamike\home"
ErrorLog "D:\apache\htdocs\datamike\logs\error_log"
TransferLog "D:\apache\htdocs\datamike\logs\access_log"
ServerName www.datamike.org
ServerAlias 127.0.0.1
DirectoryIndex index.php
</VirtualHost>


<VirtualHost 127.0.0.1:80>
ServerAdmin webmaster@phponline.com
DocumentRoot "D:\apache\htdocs\phponline\home"
ErrorLog "D:\apache\htdocs\phponline\logs\error_log"
TransferLog "D:\apache\htdocs\phponline\logs\access_log"
ServerName www.intra.net
ServerAlias 127.0.0.1
DirectoryIndex index.php
</VirtualHost>
---------

Any ideas?

Reply With Quote
  #7  
Old November 7th, 2001, 02:16 AM
NoXcuz's Avatar
NoXcuz NoXcuz is offline
Wiking
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Sep 2000
Location: Sweden
Posts: 3,608 NoXcuz User rank is Sergeant (500 - 2000 Reputation Level)NoXcuz User rank is Sergeant (500 - 2000 Reputation Level)NoXcuz User rank is Sergeant (500 - 2000 Reputation Level)NoXcuz User rank is Sergeant (500 - 2000 Reputation Level)NoXcuz User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 7 h 49 m 27 sec
Reputation Power: 21
You're probably missing one line above the <VirtualHost> entry, which should look like this:

NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>
ServerAdmin webmaster@datamike
...

Try this: http://httpd.apache.org/docs/vhosts/name-based.html

//NoXcuz
__________________
UN*X is sexy!
who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep

Reply With Quote
  #8  
Old November 7th, 2001, 08:29 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> which should look like this:
>> NameVirtualHost 127.0.0.1:80

Yes. Also, you don't need to specify the IP and its port at all. You can use NameVirtualHost *.

>> <VirtualHost 127.0.0.1:80>

Like asking question in a forum with the subject field: I need help.
Who doesn't know you need help here? That's so-called stupid subject.
Similarily, port 80 is the standard port for http, so Apache knows it and you don't even need to specify it explicitly.

So change the line to: <VirtualHost *>

>> ServerAlias 127.0.0.1

Remove this in both.

>> DirectoryIndex index.php

If this is already defined globally, remove it. You specify it only if it's different from the one in global context.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Multible domains


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT