View Full Version : [ubuntu] Apache - default image directory

January 11th, 2011, 04:29 AM
IS the default image directory /var/www ?

I have set up my index.html (within the same directory) to reference a .jpg within the same direcotry but it doesn't show. ;S

I have <img src="picture.jpg" alt="" width="400" length="200" />

I'm kind of at a loss.

When I pull up my webpage it doesnt show BUT if I navigate to http://server/picture.jpg , it shows the picture!

its probably my inexperience with apache.

January 11th, 2011, 05:53 AM
theres nothing like a image directory

/var/www/ is the web root directory. it might be a permision problem try the following

sudo chmod www-data:www-data /var/www/picture.jpg

or also

<img src="/picture.jpg" alt="" width="400" length="200" />

January 11th, 2011, 06:32 AM
Also, remember that Linux is case sensitive. :)

Try adding it like this:

<img src="./picture.jpg" alt="picture" />

January 12th, 2011, 04:41 AM
I got it!

I had <img source= /> not <img src= />


Thanks anyway!

January 12th, 2011, 04:56 AM
Mistakes happen, it's one of the ways you learn. :)

Don't forget to mark the thread as solved from thread tools.