大家好,最近被老師要求架一個網站
因為配的虛擬主機是用linux只好用了...
版本是 Ubuntu 16.05 LTS
沒圖形介面(架網站不能用瀏覽器..QQ)
------------------------------------
我直接先把errorlog放上來,後面在來慢慢說明問題好了
瀏覽器直接連IP出現的畫面是 Forbidden Server unable to read htaccess file
errorlog在這裡------
(13)Permission denied: [client XXX.XXX.4.85:19051] AH00529:
/var/www/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure
it is readable and that '/var/www/html/' is executable, referer:
http://XXX.XXX.XXX.232/
看起來是那個htaccess的問題吧?
然後在放上我的apache2.conf 查到說要修改的地方,麻煩幫我看一下~
我查到的大部分都說要改AllowOverride
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Directory /var/www/html/>
AllowOverride All
</Directory>
#<Directory /srv/>
# Options Indexes FollowSymLinks
# AllowOverride None
# Require all granted
#</Directory>
請問這樣看得出是哪裡有問題嗎??
還有htaccess到底是甚麼,查了一堆還是看不懂
好像是甚麼權限問題??
還請各位幫忙一下,謝謝!
--
因為配的虛擬主機是用linux只好用了...
版本是 Ubuntu 16.05 LTS
沒圖形介面(架網站不能用瀏覽器..QQ)
------------------------------------
我直接先把errorlog放上來,後面在來慢慢說明問題好了
瀏覽器直接連IP出現的畫面是 Forbidden Server unable to read htaccess file
errorlog在這裡------
(13)Permission denied: [client XXX.XXX.4.85:19051] AH00529:
/var/www/html/.htaccess pcfg_openfile: unable to check htaccess file, ensure
it is readable and that '/var/www/html/' is executable, referer:
http://XXX.XXX.XXX.232/
看起來是那個htaccess的問題吧?
然後在放上我的apache2.conf 查到說要修改的地方,麻煩幫我看一下~
我查到的大部分都說要改AllowOverride
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Directory /var/www/html/>
AllowOverride All
</Directory>
#<Directory /srv/>
# Options Indexes FollowSymLinks
# AllowOverride None
# Require all granted
#</Directory>
請問這樣看得出是哪裡有問題嗎??
還有htaccess到底是甚麼,查了一堆還是看不懂
好像是甚麼權限問題??
還請各位幫忙一下,謝謝!
--
All Comments