Ubuntu 10.10 + apache: vhost não funciona

2

Em casa, eu tenho um sistema de desktop Ubuntu 10.10 para fins de desenvolvimento. Por alguma razão, não consigo trabalhar com hospedagem virtual. No trabalho eu tenho uma configuração quase semelhante (completamente feito por mim) com o Apache e vhost trabalhando.

  • Hosts: adicionei o nome de domínio local ao arquivo de hosts e parece funcionar. Eu vejo a página do host padrão.
  • Abaixo, você vê os módulos que eu habilitei, além dos sites habilitados.
  • reiniciei o Apache

Estou perdido pelo que sinto falta aqui para conseguir isso funcionar.

* apache.conf *

Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/

* mods-enabled *

lrwxrwxrwx 1 root root   28 2009-07-28 23:20 alias.conf -> ../mods-available/alias.conf
lrwxrwxrwx 1 root root   28 2009-07-28 23:20 alias.load -> ../mods-available/alias.load
lrwxrwxrwx 1 root root   33 2009-07-28 23:20 auth_basic.load -> ../mods-available/auth_basic.load
lrwxrwxrwx 1 root root   33 2009-07-28 23:20 authn_file.load -> ../mods-available/authn_file.load
lrwxrwxrwx 1 root root   36 2009-07-28 23:20 authz_default.load -> ../mods-available/authz_default.load
lrwxrwxrwx 1 root root   38 2009-07-28 23:20 authz_groupfile.load -> ../mods-available/authz_groupfile.load
lrwxrwxrwx 1 root root   33 2009-07-28 23:20 authz_host.load -> ../mods-available/authz_host.load
lrwxrwxrwx 1 root root   33 2009-07-28 23:20 authz_user.load -> ../mods-available/authz_user.load
lrwxrwxrwx 1 root root   32 2009-07-28 23:20 autoindex.conf -> ../mods-available/autoindex.conf
lrwxrwxrwx 1 root root   32 2009-07-28 23:20 autoindex.load -> ../mods-available/autoindex.load
lrwxrwxrwx 1 root root   26 2009-07-28 23:20 cgi.load -> ../mods-available/cgi.load
lrwxrwxrwx 1 root root   30 2009-07-28 23:20 deflate.conf -> ../mods-available/deflate.conf
lrwxrwxrwx 1 root root   30 2009-07-28 23:20 deflate.load -> ../mods-available/deflate.load
lrwxrwxrwx 1 root root   26 2009-07-28 23:20 dir.conf -> ../mods-available/dir.conf
lrwxrwxrwx 1 root root   26 2009-07-28 23:20 dir.load -> ../mods-available/dir.load
lrwxrwxrwx 1 root root   26 2009-07-28 23:20 env.load -> ../mods-available/env.load
lrwxrwxrwx 1 root root   27 2009-07-28 23:20 mime.conf -> ../mods-available/mime.conf
lrwxrwxrwx 1 root root   27 2009-07-28 23:20 mime.load -> ../mods-available/mime.load
lrwxrwxrwx 1 root root   34 2009-07-28 23:20 negotiation.conf -> ../mods-available/negotiation.conf
lrwxrwxrwx 1 root root   34 2009-07-28 23:20 negotiation.load -> ../mods-available/negotiation.load
lrwxrwxrwx 1 root root   27 2009-07-28 23:20 php5.conf -> ../mods-available/php5.conf
lrwxrwxrwx 1 root root   27 2009-07-28 23:20 php5.load -> ../mods-available/php5.load
lrwxrwxrwx 1 root root   33 2010-05-26 21:49 reqtimeout.conf -> ../mods-available/reqtimeout.conf
lrwxrwxrwx 1 root root   33 2010-05-26 21:49 reqtimeout.load -> ../mods-available/reqtimeout.load
lrwxrwxrwx 1 root root   31 2009-07-28 23:20 setenvif.conf -> ../mods-available/setenvif.conf
lrwxrwxrwx 1 root root   31 2009-07-28 23:20 setenvif.load -> ../mods-available/setenvif.load
lrwxrwxrwx 1 root root   29 2009-07-28 23:20 status.conf -> ../mods-available/status.conf
lrwxrwxrwx 1 root root   29 2009-07-28 23:20 status.load -> ../mods-available/status.load
lrwxrwxrwx 1 root root   34 2010-11-25 11:12 vhost_alias.load -> ../mods-available/vhost_alias.load

* sites habilitados *

lrwxrwxrwx 1 root root   26 2009-07-28 23:20 000-default -> ../sites-available/default
lrwxrwxrwx 1 root root   32 2010-11-13 22:03 test.local -> ../sites-available/test.local

* messages *

Nov 25 15:10:56 ubuntu-rxt kernel: [234402.009386] [UFW BLOCK] IN=eth0 OUT= MAC=00:0e:2e:b8:72:59:00:24:fe:d4:bc:02:08:00 SRC=192.168.178.1 DST=192.168.178.26 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=14809 DF PROTO=TCP SPT=4913 DPT=14013 WINDOW=5840 RES=0x00 SYN URGP=0

* error.log *

[Thu Nov 25 15:13:57 2010] [notice] caught SIGTERM, shutting down
[Thu Nov 25 15:13:58 2010] [notice] Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4 with Suhosin-Patch configured -- resuming normal operations

* access.log *

127.0.0.1 - - [25/Nov/2010:15:15:24 +0100] "GET / HTTP/1.1" 304 211 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3"

* hosts *

127.0.0.1   localhost test.local
127.0.1.1   ubuntu-rxt

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

* test.local *

<VirtualHost *:80>
DocumentRoot /var/www-vhosts/test.local
<Directory /var/www-vhosts/test.local/>
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    allow from all
</Directory>
</VirtualHost>

* padrão *

<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /var/www
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
</Directory>

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>
    
por SPRBRN 25.11.2010 / 14:46

1 resposta

2

Você não precisa de ServerName / ServerAlias para os sites? Dê uma olhada aqui:

por 25.11.2010 / 19:15