我運行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