Page 1 of 1

403 error and Directory/Files are not Read-Only! Help!

PostPosted: 21. August 2006 02:38
by burgermeister
I had to move my server since my other one is not usable anymore. So I re-installed xampp latest for windows and apache runs fine and mysql blah blah blah. Then I try to access any site and I get a 403 error saying that the files may be read-only. So how do I disable this stupid 403 error problems. I used another server and it has no problems, but it's a non-service webserver so I can't use that.

Re: 403 error and Directory/Files are not Read-Only! Help!

PostPosted: 21. August 2006 03:08
by Izzy
burgermeister wrote:I had to move my server since my other one is not usable anymore. So I re-installed xampp latest for windows and apache runs fine and mysql blah blah blah. Then I try to access any site and I get a 403 error saying that the files may be read-only. So how do I disable this stupid 403 error problems. I used another server and it has no problems, but it's a non-service webserver so I can't use that.

You seem to have a similar problem here:
http://community.apachefriends.org/f/viewtopic.php?p=80768

Did the fix for that 403 not fix this issue?

Look in:
xampp/apache/logs/error.log
and see if it gives you more of an indication as to the problem.

Also check you have this inside each vhost containers <Directory> directive:

Order allow,deny
Allow from all

PostPosted: 21. August 2006 03:53
by burgermeister
This is my error in the error log:

Code: Select all
[Sun Aug 20 21:31:50 2006] [error] [client 208.101.74.220] client denied by server configuration: D:/Applications/Server/htdocs/


I don't know what you mean with the Allow all directory whatever and such. Please give me an example!

PostPosted: 21. August 2006 04:15
by Izzy
burgermeister wrote:...I don't know what you mean with the Allow all directory whatever and such. Please give me an example!

Do you have virtual hosts configured in:
xampp/apache/conf/extra/httpd-vhosts.conf

Is D:/Applications/Server/htdocs/ your DocumentRoot in the XAMPP /apache/conf/httpd.conf ?

When you installed or moved your server did you run the setup_xampp.bat?

PostPosted: 21. August 2006 04:22
by burgermeister
Virtual Hosts configured in the vhost-httpd.conf

Code: Select all
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "D:/Applications/Server/htdocs"


and I installed a fresh copy on the new server. I just moved over all of the htdocs

PostPosted: 21. August 2006 04:42
by burgermeister
Izzy wrote:
burgermeister wrote:Virtual Hosts configured in the vhost-httpd.conf

Is it possible to post the relevant virtual host container please?


Code: Select all
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "D:/Applications/Server/htdocs"

Below this entry there is a <Directory> directive is this configured correctly?
Paste it if you can please.

and I installed a fresh copy on the new server. I just moved over all of the htdocs
Is the server in the default path c:/xampp ?


1.
Code: Select all
<VirtualHost *:80>
ServerAdmin admin@zpanelhost.info
ServerName zpanelhost.info
ServerAlias www.zpanelhost.info
DocumentRoot D:\Applications\Server\htdocs
DirectoryIndex index.php index.html index.htm
</VirtualHost>


2.
Code: Select all
DocumentRoot "D:\Applications\Server\htdocs"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features. 
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>


3. No I installed it to D:/Applications/Server/xampp

PostPosted: 21. August 2006 05:07
by Izzy
bergermeister wrote:
Code: Select all
<VirtualHost *:80>
ServerAdmin admin@zpanelhost.info
ServerName zpanelhost.info
ServerAlias www.zpanelhost.info
DocumentRoot D:\Applications\Server\htdocs
DirectoryIndex index.php index.html index.htm
</VirtualHost>


Change it to this and it will fix your problem:
Code: Select all
<VirtualHost *:80>
ServerAdmin admin@zpanelhost.info
ServerName zpanelhost.info
ServerAlias www.zpanelhost.info
DocumentRoot D:\Applications\Server\htdocs
DirectoryIndex index.php index.html index.htm
<Directory "D:\Applications\Server\htdocs" >
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


This is causing your access denied issue and so it should:
Code: Select all
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>


You have to change this behaviour in every virtual host container you create so as to over ride the restrictive defaults in the httpd.conf file.


When not installing to the default c:/xammp directory the setup_xampp.bat should be run to change the paths to your non default installation. Though this has zero to do with you issue.