PDA

Visualizza la versione completa : [Apache] Virtual Host


SkOrPiOn`87
06-07-2005, 13:56
Qualcuno sa darmi una mano a configurare i virtual host di apache 1.3.x?


ServerName web.arrakisnet.org

NameVirtualHost 82.53.134.64

<VirtualHost www.arrakisnet.org>
ServerAdmin xxxxx@gmail.com
DocumentRoot /www/docs/arrakisnet.org
ServerName www.arrakisnet.org
ErrorLog logs/arrakisnet.org-error_log
CustomLog logs/arrakisnet.org-access_log common
</VirtualHost>

root@arrakis:/var/www/htdocs# httpd -S
VirtualHost configuration:
82.53.134.64:80 is a NameVirtualHost
default server www.arrakisnet.org (/etc/apache/httpd.conf:1018)
port 80 namevhost www.arrakisnet.org (/etc/apache/httpd.conf:1018)


Grazie :ciauz:

SkOrPiOn`87
06-07-2005, 22:53
:messner:

SkOrPiOn`87
07-07-2005, 13:35
nessuno?

alvinet
07-07-2005, 14:12
Ma troppo di peso guardare la documentazione ufficiale di apache? Ci sono pagine dedicate solamente a quello.

SkOrPiOn`87
07-07-2005, 14:53
l'ho guardata e non trovo l'errore

alvinet
07-07-2005, 17:41
hai provato cos?


NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.domain.tld
ServerAlias domain.tld *.domain.tld
DocumentRoot /www/domain
</VirtualHost>

<VirtualHost *:80>
ServerName www.otherdomain.tld
DocumentRoot /www/otherdomain
</VirtualHost>


Edita poi il tuo file hosts specificando le righe come segue:


127.0.0.1 www.domain.tld
127.0.0.1 www.otherdomain.tld

SkOrPiOn`87
07-07-2005, 20:57
NameVirtualHost *:80


<VirtualHost *:80>
ServerAdmin sardukar87@gmail.com
DocumentRoot /home/federico/web
ServerName www.arrakisnet.org
ErrorLog logs/arrakisnet.org-error_log
CustomLog logs/arrakisnet.org-access_log common
</VirtualHost>


root@arrakis:/usr/sbin# /etc/rc.d/rc.httpd start
/usr/sbin/apachectl start: httpd could not be started


PS: ho anche aggiunto il nome al hosts ma niente...

pilovis
12-07-2005, 19:41
#
# File: httpd.conf

ServerType standalone
Port 80
HostnameLookups off
User nobody
Group nobody
ServerAdmin root@localhost
ServerRoot /www
BindAddress *
ErrorLog logs/error_log
TransferLog logs/access_log
PidFile /var/run/httpd.pid
ServerName localhost
Timeout 400

# se vuoi limitare Apache per utilizzo CPU e memoria decommenta
# primo valore min - secondo valore MAX

#RLimitCPU 35 40
#RLimitMEM 29000000 30000000

KeepAlive 5
KeepAliveTimeout 15
MinSpareServers 5
StartServers 5
MaxClients 100
MaxRequestsPerChild 30

#Ascolta sulla porta 80
Listen 80

NameVirtualHost 192.168.1.1

<virtualhost 192.168.1.1>
ServerName mioserver.com
ServerAdmin webmaster@mioserver.com
</virtualhost>

<virtualhost 192.168.1.1>
ScriptAlias /cgi-bin/ /www/pippo/cgi-bin/
ScriptAlias /cgi-pippo/ /www/pippo/cgi-bin/
User pippo
Group pippogrp
ServerAdmin webmaster@pippo.com
ServerName pippo.com
ServerAlias www.pippo.com
ErrorDocument 404 /missing.html
DocumentRoot /www/pippo
TransferLog logs/pippo-access-log
HostNameLookups on
</virtualhost>

Loading