Question

I created .htaccess and .htpassword for password protection in apache. Then, I modified https.conf.

<Directory "/Library/WebServer/Documents">
    Options Indexes FollowSymLinks MultiViews
    #AllowOverride None
    AllowOverride AuthConfig All
    Order allow,deny
    Allow from all
</Directory>

After the setting, password protection works fine, but the issue is that the webpage cannot load image file which is in subdirectory of "/Library/WebServer/Documents". Executing tail /var/log/apache2/error_log gives me this error message.

[error] [client 127.0.0.1] client denied by server configuration: /Library/WebServer/Documents/moniwiki/data/cache/gnuplot/wikipagesetupMacBookProTask]-wikipages.png, referer: http://localhost/moniwiki/wiki.php/setupMacBookProTask

When I make AllowOverride AuthConfig None, the error is gone, then there is no password protection.

What's wrong with this? How can I access the subdirectory with password protection?

Était-ce utile?

La solution

Following the instruction on this wiki, I added

<Directory "/Library/WebServer/Documents/moniwiki/data/cache/gnuplot">
Order allow,deny
Allow from all
</Directory>

to the https.conf, and it works fine.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top