我在Apache安裝在本地主機已經這個問題(13.04 Ubuntu的)錯誤404在WWW文件夾
提示:
全新安裝和httpd.conf文件是空的(空白)
這命令行打開一個文件:
sudo gedit /etc/apache2/sites-available/default
的文件中有這樣的數據:
<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
</VirtualHost>
,我需要移動的/ var/www會我的主目錄,例如:
/home/USER/www/site1
/home/USER/www/site2
在提前謝謝! :D
那麼就這樣做吧? DocumentRoot/var/www =>/home/USER/www – kelunik
和Directory指令 – Orangepill
我試過了,但它沒有工作,你仍然收到錯誤404 – MrRoman