我运行Ubuntu上访问本地主机时未找到错误。我的Apache2默认文件看起来是这样的:404试图本地LAMP服务器
<VirtualHost *:80>
ServerAdmin [email protected]
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
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>
我/这个文件在/ var/WWW名为index.php的
<?
phpinfo();
?>
当我在我的浏览器访问http://localhost/,我得到了404未找到错误:
请求的URL /没有被此服务器上找到。 的Apache/2.2.16(Ubuntu的)在本地主机端口80
服务器什么是我做错了什么?当我第一次设置LAMP时,这实际上工作,但它现在不工作。
@Codemwnci没有进攻,但他怎么能从Apache的错误信息,如果它没有运行? – hatkirby 2010-10-30 18:18:44
您确定没有2个apaches同时运行吗?它可能会导致类似的问题。 – 2010-10-30 18:20:18
我从来没有做过任何表明两个Apaches同时运行的东西。就像我说的那样,当我第一次设置它时,这起作用,然后发生了什么事情,我将DocumentRoot更改为另一个位置并将其更改回来,然后它开始不起作用。 – slandau 2010-10-30 18:25:09