Tuesday, May 14, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 13806  / 2 Years ago, wed, march 16, 2022, 11:47:46

I've read the answer at Apache2: Forbidden You don't have permission to access /dir/ on this server as well as all of the related questions and none of the solutions seem to work.



I'm trying to set up Apache with SSL but am getting a 403 Forbidden error when I go to https://[::1]/ or https://localhost/.



My only "sites-enabled" are localssl and this is localssl.conf:



<VirtualHost _default_:443>

ServerAdmin webmaster@localhost

####Configuration for SSL #####
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/server.pem
SSLCertificateKeyFile /etc/apache2/ssl/server.key
#### End of SSL Configuration ####

DocumentRoot /data
<Directory /data>
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

LogLevel warn
</VirtualHost>


Permissions for /data are set to 755 for root:www-data recursively.



In my apache2.conf file:



#<Directory /var/www/>
# Options Indexes FollowSymLinks
# AllowOverride None
# Require all granted
#</Directory>

<Directory /data/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>


I've also tried omitting the section in apache2.conf and it did not make a difference.



What else do I need to do to get this to work?


More From » server

 Answers
3

Problem solved by adding Indexes into the Options directive:



In the Directory "node" inside localssl.conf:



    <Directory /data>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

[#21995] Thursday, March 17, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
variark

Total Points: 82
Total Questions: 114
Total Answers: 122

Location: Sweden
Member since Mon, May 8, 2023
1 Year ago
;