Page 1 of 1

Error 403 Forbidden loading images

PostPosted: 02. February 2012 07:41
by rumba2012
Hi guys,

I have this problem and I don't know how to solve it. I already checked in this forum some answer but don't work.
I installed XAMPP 1.7.7 and then I configured the virtuahost file like this : one for xampp and one for my website sample1. Then i add them on host file and all work.
The problem is that I receive 403 error when sample1 website wants to load some images.

How can I solve it ?
I tried to insert <Directory ... > in sample1 virtualhost but doesn't work. Maybe I wrong syntax.

Thanks for the help

<VirtualHost *:80>
##ServerAdmin postmaster@dummy-host2.localhost
DocumentRoot "C:/xampp/htdocs"
ServerName localhost
##ErrorLog "logs/dummy-host2.localhost-error.log"
##CustomLog "logs/dummy-host2.localhost-access.log" combined
</VirtualHost>

<VirtualHost *:80>
##ServerAdmin postmaster@dummy-host2.localhost
DocumentRoot "C:/xampp/htdocs/sample1"
ServerName sample1
ServerAlias sample1.comx
##ErrorLog "logs/dummy-host2.localhost-error.log"
##CustomLog "logs/dummy-host2.localhost-access.log" combined

<Directory "C:/xampp/htdocs/sample1">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


In log-file there is written (one of them)
...
[Thu Feb 02 16:54:43 2012] [error] [client 127.0.0.1] (OS 5)Accesso negato. : file permissions deny server access: C:/xampp/htdocs/sample1/img/new-ribbon.png, referer: http://sample1.comx/
...

Re: Error 403 Forbidden loading images

PostPosted: 02. February 2012 19:21
by Altrea
Hi rumba2012,

Have you restarted your Apache after you added the <Directory>-part in your vhost file?
Changes on Apache config files are just taken effect after a restart of the Apache.

best wishes,
Altrea

Re: Error 403 Forbidden loading images

PostPosted: 02. February 2012 22:09
by rumba2012
Hi Altrea, thank for you reply ..

Oh yes, i did it. I really don't know why it doesn't work yet ..

Re: Error 403 Forbidden loading images

PostPosted: 21. February 2012 21:26
by Grafica
Please see "Re: can't access new site folders in htdocs." The folder containing the images might be encrypted. Right-click the folder or file you want to decrypt, and then click Properties. Click the General tab, and then click Advanced. Clear the Encrypt contents to secure data check box, click OK, and then click OK again.