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.

This question already has an answer here:

I am testing a piece of software that is working except for some SVG images that are not showing. When I preview them using Firebug in Firefox, it says "Failed to load the given URL," however, when I manually visit the image's URL, it shows just fine.

All file and directory permissions are set to 777 as advised by the software's developer, and all the files' and directories' chown settings are set to the apache group, which seems logical to me.

What am I doing wrong?

share|improve this question
1  
If the URL works when you visit it manually the problem is likely NOT file permissions (or anything else to do with the web server). More importantly though, Unix file permissions are not some kind of black magic - there is no one setting that is universally "proper". Take the time to understand what those numbers mean, then ensure that you have set appropriate permissions based on your environment and needs. –  voretaq7 May 30 '13 at 1:23
    
@voretaq7 I set them to what the developers recommended to me, and they work on my local machine, but on my server, the images do not load. –  Dustin L. May 30 '13 at 1:25
    
Also, I wasn't sure if ServerFault or SuperUser would be the correct place to ask this, so my apologies if I made a mistake. –  Dustin L. May 30 '13 at 1:29
1  
OK, if it works one one box but not another it's time to play my favorite game -- "What's Different?". (Does apache run as a different user? If this is a Linux box, is SELinux enabled and enforcing (denying access to the files)? Is there anything in your logs? etc....) –  voretaq7 May 30 '13 at 1:30
    
If this is about a piece of software you're installing or maintaining as a professional, in some function related to your job (which is what it sounds like to me) you're in the right place -- you just need to do a little more legwork for us to help you. "It doesn't work" is a tough thing to troubleshoot (especially when we don't know what "it" is) –  voretaq7 May 30 '13 at 1:31
show 5 more comments

marked as duplicate by Andrew, Magellan, Ward, Tom O'Connor May 30 '13 at 8:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

The issue was due to Apache not serving the vector graphics properly. I fixed it by adding the following to httpd.conf:

AddType image/svg+xml svg svgz
AddEncoding gzip svgz
share|improve this answer
    
You likely have an outdated mime.types file on the server. Update it from wherever you got httpd. Or grab the latest copy from the Apache foundation: svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types –  Chris S Aug 2 '13 at 12:55
add comment

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