Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I recently moved a site to a new server where the server configuration is not allowing access to xml files:

[error] client denied by server configuration: /var/www/website/test.xml

After further testing, I get a 403 (forbidden) when trying to load any xml files. How do I enable server xml files in apache? I'm assuming it's an apache configuration.

Thanks!

Solution: my .htaccess had:

<Files ~ "\.(xml)$">
    deny from all
</Files>

I removed the above htaccess directive and denied only the xml files that shouldn't be accessed directly.

share|improve this question
    
You are getting this only for XML files? Are you 100% sure? –  Pekka 웃 Aug 16 '11 at 21:37
add comment

migrated from stackoverflow.com Aug 16 '11 at 21:57

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 1 down vote accepted

Your Apache Allow/Deny directives are configured to forbid access to the file you're trying to get.

These directives will likely be in your <VirtualHost> configuration, or an .htaccess file. Please edit your question with this info and we can assist in straightening out the rules.

share|improve this answer
    
<Directory /website> Options Indexes Includes FollowSymLinks Order allow,deny Allow from all AllowOverride All </Directory> –  Francis Aug 16 '11 at 22:24
    
It was being disallowed in the .htaccess file. Thanks! –  Francis Aug 16 '11 at 22:29
    
<Files ~ "\.(xml)$"> deny from all </Files> –  Francis Aug 16 '11 at 22:31
add comment

you'll generally get that type error when directory permissions are wrong, do all your xml files happen to be in the same directory?

  1. check the permissions on the XML files,
  2. see if you can load another type [html] file from that directory
  3. see if you can load an xml file from another directory or site.

I have a feeling it is file permissions [did you move the site VIA shell or an archive?]

-sean

share|improve this answer
    
It's not a permission issue. I can change the extension to .js and it loads up as plaintext in the browser. I set permissions to 666 just to be sure. same thing happens with new files. (not moved from the old server). –  Francis Aug 16 '11 at 21:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.