我正在尝试让gigi在我的本地主机服务器上工作.
首先,我添加了虚拟本地主机.
我有conf文件/etc/apache2/sites-available/myage.com.conf
这是此文件的内容.
<VirtualHost *:80>
ServerName mypage.com
ServerAlias www.mypage.com
ServerAdmin admin@mypage.com
DocumentRoot /var/www/mypage.com/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
ScriptAlias /cgi-bin/ /var/www/mypage.com/cgi-bin/
<Directory "/var/www/mypage.com/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
而且在重新启动apache2服务时出现错误
[Fri Jan 16 09:06:12.422793 2015] [alias:warn] [pid 12733] AH00671: The ScriptAlias directive in /etc/apache2/sites-enabled/mypage.com.conf at line 31 will probably never match because it overlaps an earlier ScriptAlias.
解决方法:
放置ScriptAlias和< Directory> …< / Directory>您已在VirtualHost标签块内声明的指令;您的上述文件当前已声明为服务器范围内的文件,因为它们不在文件范围内.
ScriptAlias重叠警告是由ScriptAlias / cgi-bin /引起的,该警告早在Apache启动时已在服务器范围内的配置文件中声明过.