Strange Apache issue

Discussion in 'Web Design and Development' started by akastrin, Aug 28, 2010.

  1. akastrin macrumors newbie

    Joined:
    Aug 28, 2010
    #1
    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
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    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" />
     

Share This Page