httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugene <httpd.subscr...@infosatgeomatica.com>
Subject Re: [users@httpd] Virtualhost
Date Wed, 01 Sep 2004 23:22:01 GMT
Hello Alain, you cant use one name for three different virtual hosts.
In your case you're assigning three different names to one IP, it just
didnt work.

It will be enough just load your module:
LoadModule access_module modules/mod_access.so
Be sure that you're loading each module just once!

Then you can try this:

<Directory /home/(A|B|C)/www>
   Options Indexes FollowSymLinks
   Order allow,deny
   Allow from all
</Directory>


...

If you have just one IP, and your server is listening on 80 or you
have configured listening like "Listen 80.10.20.30:80", it would be
enough to use name based virtual hosting without binding IP to each
address or you can configure access by names like this:

NameVirtualHost 80.10.20.30:80
<VirtualHost 80.10.20.30:80>
...
ServerName www.A.euro.st
...
</VirtualHost>

To be accessible outside IP assigned to you by provider must
match your configured IP and the host name used in your config must be
registered by DNS.

Locally you can use name based virtual hosting:

NameVirtualHost *:80
<VirtualHost *:80>
...
  ServerName www.A.euro.st
  ...
</VirtualHost>

<VirtualHost *:80>
...
  ServerName www.B.euro.st
  ...
</VirtualHost>

<VirtualHost *:80>
...
  ServerName www.C.euro.st
  ...
</VirtualHost>

====================
Or if you have more then one IP and if you want access by IP:

NameVirtualHost 80.10.20.30:80
<VirtualHost 80.10.20.30:80>
...
     ServerName 80.10.20.30
 ...
</VirtualHost>

NameVirtualHost 80.10.20.40:80
<VirtualHost 80.10.20.40:80>
...
     ServerName 80.10.20.40
 ...
</VirtualHost>

If you're tryng access outside until router didnt know that your host
binded to this IP you cant access your host by IP. Locally you can
just configure your 'hosts' configuration file and bind your local IPs
to 127.0.0.1 like this:

127.0.0.1   80.10.20.30 80.10.20.40


Regards, Eugene



Tuesday, August 31, 2004, 3:49:57 PM, you wrote:


> Hello

> I created 3 domain at ulimit.com

> A.euro.st
> B.euro.st
> C.fr.st

> ===================================
> I created 3 users on my Fedora linux box

> A
> B
> C

> ===================================
> I set right with :

> chmod -R 750 ...
> chown -R A.apache...etc...

> ===================================
> I added to the end of httpd.conf

> <Directory /home/*/www>
>  Options Indexes FollowSymLinks
>  <IfModule mod_access.c>
>   Order allow,deny
>   Allow from all
>  </IfModule>
> </Directory>
> Include conf/vhost.conf
> ===================================

> I created vhost.conf


> NameVirtualHost 80.10.20.30:80

> <VirtualHost 80.10.20.30:80>
>     ServerAdmin asiani@free.fr
>     DocumentRoot /home/A/www
>     ServerName www.A.euro.st
>     ServerPath /A
>     ErrorLog logs/A-error_log
>     ServerAlias A.euro.st
> </VirtualHost>

> <VirtualHost 80.10.20.30:80>
>     ServerAdmin asiani@free.fr
>     DocumentRoot /home/B/www
>     ServerName www.B.euro.st
>     ServerPath /B
>     ErrorLog logs/B-error_log
>     ServerAlias B.euro.st
> </VirtualHost>

> <VirtualHost 80.10.20.30:80>
>     ServerAdmin asiani@free.fr
>     DocumentRoot /home/C/www
>     ServerName www.C.fr.st
>     ServerPath /C
>     ErrorLog logs/C-error_log
>     ServerAlias C.fr.st
> </VirtualHost>


> ===================================

> I restart httpd

> service httpd restart

> All is ok !

> ===================================

> I tried to go to my IP with internet explorer :

> http://80.10.20.30

> The domain A is opened
> access.log :
> 192.168.0.2 - - [31/Aug/2004:20:34:46 +0200] "GET / HTTP/1.1" 200
> 11 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FREE;
> .NET CLR 1.1.4322)"

> I tried to go to : http://www.A.euro.st
> The domain A is opened
> access.log
> 192.168.0.2 - - [31/Aug/2004:20:35:49 +0200] "GET / HTTP/1.1" 200
> 11 "http://www.A.euro.st" "Mozilla/4.0 (compatible; MSIE 6.0;
> Windows NT 5.1; FREE; .NET CLR 1.1.4322)"

> I tried to go to : http://www.B.euro.st
> The domain A is opened
> access.log
> 192.168.0.2 - - [31/Aug/2004:20:36:47 +0200] "GET / HTTP/1.1" 200
> 11 "http://www.B.euro.st" "Mozilla/4.0 (compatible; MSIE 6.0;
> Windows NT 5.1; FREE; .NET CLR 1.1.4322)"

> I tried to go to : http://www.C.euro.st
> The domain A is opened
> access.log
> 192.168.0.2 - - [31/Aug/2004:20:37:38 +0200] "GET / HTTP/1.1" 200
> 11 "http://www.C.fr.st" "Mozilla/4.0 (compatible; MSIE 6.0; Windows
> NT 5.1; FREE; .NET CLR 1.1.4322)"

>  


> configuration :
> Linux localhost.localdomain 2.4.22-1.2115.nptl #1 Wed Oct 29
> 15:31:21 EST 2003 i686 athlon i386 GNU/Linux

> [root@localhost www]# httpd -v
> Server version: Apache/2.0.47
> Server built:   Oct 23 2003 06:48:44

>  

> I would like to go on the right domain !!!
> Please help me !
> Thanks,
> Alain S.



> ----------------------------------------------------------------------------------------------------------------------------------------------


>> Message du 31/08/04 16:36
>> De : "Robert Andersson" 
>> A : users@httpd.apache.org
>> Copie à : 
>> Objet : Re: [users@httpd] Virtualhost
>> [When starting a new topic, don't reply to another mail]
>> 
>> asiani@wanadoo.fr wrote:
>> > i tried with apache documentation, with lea-linux.org documentation
>> > it seems to be very simple but it doesn't run !
>> 
>> Ok, interesting to know...
>> 
>> ...
>> 
>> If you want help, you must provide information. What do you want to do? What
>> did you try, and in what way did that not match your expectaions?
>> 
>> Regards,
>> Robert Andersson
>> 
>> 
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See 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
>> 
>> 




-- 
Best regards,
 Eugene                            mailto:httpd.subscribe@infosatgeomatica.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


Mime
View raw message