1
votes

I know there are many threads about this but after reading them all and trying many different configs, I can't seem to find the right formula for accessing an image folder of my magento website through a wamp virtualhost (403 Forbidden access on this server).

Error message :

Forbidden

You don't have permission to access /app/design/frontend/default/template/page/slider/images/slide3.png on this server.

My site is in

c:/net generation/wamp/www/foodmeup

Loading the normal pages through my virtual host is not the problem, everything goes fine except for some custom images located in

C:\Net Generation\wamp\www\foodmeup\app\design\frontend\foodmeup\default\template\page\slider\images

My link to those image is for example <img src="/app/design/frontend/default/template/page/slider/images/foodanalytics_groupe_mini.png"

and the folder contains a .htaccess :

Order deny,allow
allow from all

my httpd-vhosts.conf is

<VirtualHost *:80>  
        DocumentRoot "c:/net generation/wamp/www/foodmeup" 
        ServerName foodmeup.local
        <Directory "c:/net generation/wamp/www/foodmeup">
             Options Indexes FollowSymLinks
             AllowOverride All
             Order deny,allow
             Allow from all
        </Directory>
</VirtualHost>

<VirtualHost *:80>  
        DocumentRoot "c:/net generation/wamp/www" 
        ServerName localhost
        ServerAlias 127.0.0.1
</VirtualHost>

my apache error log is

[Mon Jun 16 10:35:09.410086 2014] [access_compat:error] [pid 5748:tid 1512] [client 127.0.0.1:53676] AH01797: client denied by server configuration: C:/Net Generation/wamp/www/foodmeup/app/design/frontend/default/template

After trying all kind of combinations, I just don't know what else to do, images located in this folder won't load because of permissions. Does anyone have a clue? Thanks a lot!

1

1 Answers

1
votes

As you are getting a message from access_compat I assume you are using a Apache 2.4.x

You could try

a) fixing the security syntax and adding some to localhost.

<VirtualHost *:80>  
    DocumentRoot "c:/net generation/wamp/www/foodmeup" 
    ServerName foodmeup.local
    <Directory "c:/net generation/wamp/www/foodmeup">
         Options Indexes FollowSymLinks
         AllowOverride All
         Order Allow,Deny
         Allow from all
    </Directory>
</VirtualHost>

<VirtualHost *:80>  
    DocumentRoot "c:/net generation/wamp/www" 
    ServerName localhost
    ServerAlias 127.0.0.1
    <Directory "c:/net generation/wamp/www">
         Options Indexes FollowSymLinks
         AllowOverride All
         Order Deny,Allow
         Deny from all
         Allow from 127.0.0.1 localhost ::1
    </Directory>
</VirtualHost>

Or

b) Using the Apache 2.4 syntax and adding some to localhost

<VirtualHost *:80>  
    DocumentRoot "c:/net generation/wamp/www/foodmeup" 
    ServerName foodmeup.local
    <Directory "c:/net generation/wamp/www/foodmeup">
         Options Indexes FollowSymLinks
         AllowOverride All
         Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:80>  
    DocumentRoot "c:/net generation/wamp/www" 
    ServerName localhost
    ServerAlias localhost
    <Directory "c:/net generation/wamp/www">
         Options Indexes FollowSymLinks
         AllowOverride All
         Require local
    </Directory>
</VirtualHost>

Other than that there does not seem to be anything wrong.

SECOND TRY

Hang on, these 2 paths are not the same?? Is it as simple as that?

C:\Net Generation\wamp\www\foodmeup\app\design\frontend\foodmeup\default\template\page\slider\images

<img src="/app/design/frontend/default/template/page/slider/images/foodanalytics_groupe_mini.png"