Apache的命令无效“的ScriptAlias” [英] apache invalid command 'ScriptAlias'
问题描述
我想获得的Apache2运行,但无论我做什么,因为404没有找到本地主机上来。
I am trying to get apache2 running but no matter what I do, localhost comes up as 404 not found.
的已经有这么多的错误,Debian不会甚至认为已安装的Apache2,但它的功能和运行。但我不能用--purge或删除它。的
当我启动Apache,我得到
When I start apache I get
root@debian:/tmp# /etc/init.d/apache2 restart
Syntax error on line 16 of /etc/apache2/sites-enabled/000-default:
Invalid command 'ScriptAlias', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
The Apache error log may have more information.
failed!
下面是网站文件
<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>
我已经试过各种配置。我的目标是利用80端口上为不同的虚拟主机多个IP地址,但我还没有得到它我最后的灾难并重新安装后正常工作。
I've tried various configurations. My goal is to utilize multiple IPs for different virtual hosts on port 80, but I haven't even gotten it to work after my last disaster and re installation.
推荐答案
的ScriptAlias由mod_alias中提供。在基于Debian的发行版,使用a2enmod确保mod_alias中被加载。
ScriptAlias is provided by mod_alias. On debian based distributions, use a2enmod to make sure mod_alias is loaded.
这篇关于Apache的命令无效“的ScriptAlias”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!