Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

akastrin

macrumors newbie
Original poster
Aug 28, 2010
1
0
Dear all,

I run apache on my mac. My document root folder is
/Library/WebServer/Documents. When I create new subfolder under
Documents folder I can't load images from that subfolder.

My html file under /Library/WebServer/Documents/test is:

<html>
<body>
<h1>Test</h1>
<img src="http://localhost/test/angry.gif"/>
img src="angry.gif"/>
</body>
</html>

The angry.gif file is placed under test/ folder. I also perform chmod
-R 777 test/ but doesn't seem efficient. Even if I try to access
angry.gif directly with the url http://localhost/test/angry.gif, it
doesn't work

Any suggestion?

Andrej
 
What specific error is it giving you?

Also, this is malformed HTML
HTML:
<img src="http://localhost/test/angry.gif"/>
img src="angry.gif"/>
You're missing the first < on the second img tag.

You can try using a different path style
HTML:
<img src="/test/angry.gif" />
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.