0
試圖設置我的網絡服務器,並允許所有www目錄中的.htaccess。當訪問我的筆記本電腦上的sub.domain.com(調整主機文件)時,返回一個403 Forbidden。 「您無權訪問/在此服務器上。」403 Forbidden vhost Ubuntu
感覺就像.htaccess文件是不允許的,因此會拋出403.但根據我的理解,設置是正確的不是?我可以忽略一些東西嗎
apache2.conf
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
AllowOverride All
</Directory>
domain.com.conf
<VirtualHost *:80>
ServerName domain.com
ServerAlias sub.domain.com
ServerAdmin [email protected]
DocumentRoot /var/www/domain.com/public_html/support/current
<Directory "/var/www/domain.com/public_html/support/current">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:443>
ServerName domain.com
ServerAlias .domain.com
ServerAdmin [email protected]
DocumentRoot /var/www/domain.com/public_html/support/current
<Directory "/var/www/domain.com/public_html/support/current">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
缺省的apache用戶的用戶www-data是否可能對您指定的文件夾沒有權限? – Fuzzzzel