|
刚在VPS里安装了LAMP,基本上是按照这篇文档http://library.linode.com/lamp-guides/debian-5-lenny/ 安装的。
/etc/apache2/sites-available/default 文件没有动过
# cat /etc/apache2/sites-available/wuliaoa.com
<VirtualHost 69.164.194.85:80>
ServerAdmin i@wuliaoa.com
ServerName wuliaoa.com
ServerAlias *.wuliaoa.com
DocumentRoot /www/wuliaoa.com/public_html/
ErrorLog /www/log/wuliaoa.com/error.log
CustomLog /www/log/wuliaoa.com/access.log combined
</VirtualHost>
现在的问题是访问wuliaoa.com所指向的目录还是/var/www/ 而二级域名却指到 /www/wuliaoa.com/public_html/
执行a2dissite default 后访问wuliaoa.com是指向 /www/wuliaoa.com/public_html/ 目录
但是a2ensite default后,又出现这个问题。
# cat /etc/apache2/sites-available/default
<VirtualHost 69.164.194.85: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> |
|