我试图让apache2运行,但是不管我做什么,本地主机都是404找不到的。
有太多的错误,Debian甚至不认为Apache2已经安装了,但是它是功能性的,并且正在运行。但我不能用.清除或其他方法把它移除。
当我开始阿帕奇的时候
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,但在上次灾难和重新安装之后,我甚至还没有让它开始工作。
发布于 2015-02-10 03:04:10
ScriptAlias由mod_alias提供。在基于debian的发行版上,使用a2enmod确保加载了mod_alias:sudo a2enmod alias
https://stackoverflow.com/questions/28422902
复制相似问题