PDA

View Full Version : [ubuntu] About to give up on my server



IslayMist
March 8th, 2009, 11:47 AM
Ok... in /var/www there is a file called index.php... everthing works just fine with that... Now, I want to use folders in my default site to keep it nice and tidy. For example, /var/www/icons and /var/www/images and so on. It's just that... when I refer to icons or images in these folders, I just get broken links all the time... WHY ? I going bananas here... been checking configuration files for days, trying to understand what I'm doing wrong... nothing. Even reinstalled my server, just to make sure... Any idea ?

Nepherte
March 8th, 2009, 12:19 PM
Make sure the url is right (perhaps try relative urls to refer to it) and check the permissions of the subfolders. They should be the same as the permissions for /var/www.

IslayMist
March 8th, 2009, 12:26 PM
I checked and rechecked the permissions on the folders and they are identical to /var/www. I also tried different url's to find a way out, but no luck.

Nepherte
March 8th, 2009, 04:21 PM
What's the exact error apache gives?

DGortze380
March 8th, 2009, 04:24 PM
/var/www is the root folder for your website...

so to link to a graphic in /var/www/icons

<a href="icons/myIcon.gif">myicon</a>

scottuss
March 8th, 2009, 04:25 PM
That's your problem, you are using backslashes in the URL. Use forward slashes.

<a href="icons\myIcon.gif">myicon</a> should be <a href="/icons/myIcon.gif">myicon</a>

DGortze380
March 8th, 2009, 04:28 PM
That's your problem, you are using backslashes in the URL. Use forward slashes.

<a href="icons\myIcon.gif">myicon</a> should be <a href="/icons/myIcon.gif">myicon</a>

I'm not the OP, sorry for the typo though.. ](*,)

scottuss
March 8th, 2009, 04:32 PM
I'm not the OP, sorry for the typo though.. ](*,)


Haha, sorry mate I didn't realise! I should re-read what I type before I hit Submit! :D

IslayMist
March 8th, 2009, 05:27 PM
Well, the server never presents an error, nor a warning.
I am actually using a line like the this:
<img src="/icons/myicon.png" />

Should work out fine, or maybe this is wrong ?

hyper_ch
March 8th, 2009, 06:51 PM
furthermore I think the apache default config has an alias for "icons". So you can't really use that (check the /etc/apache2/apache2.conf for it).

IslayMist
March 8th, 2009, 07:31 PM
Thats it ! Finally :D Thank you so much for your help hyper !!