|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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. |
|
#2
|
|||
|
|||
|
Put another FQDN on the same line like so:
127.0.0.1 default.domain.com virtual.domain.com |
|
#3
|
||||
|
||||
|
Thanks, I'll try that today...
|
|
#4
|
||||
|
||||
|
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? |
|
#5
|
|||
|
|||
|
Show us the unedited error message as well as your <VirtualHost> configuration.
|
|
#6
|
||||
|
||||
|
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? |
|
#7
|
||||
|
||||
|
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 |
|
#8
|
|||
|
|||
|
>> 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. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > Multible domains |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|