我在本地主机(Ubuntu 13.04)中的 Apache 安装中遇到了这个问题
提示:
全新安装和 httpd.conf 文件为空(空白)
此命令行打开一个文件:
sudo gedit /etc/apache2/sites-available/default
该文件具有以下数据:
<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 ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
我需要将 /var/www 移动到我的主目录,例如:
/home/USER/www/site1
/home/USER/www/site2
提前谢谢你!:D