Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: About to give up on my server

  1. #1
    Join Date
    Jan 2009
    Beans
    10

    About to give up on my server

    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 ?

  2. #2
    Join Date
    Apr 2007
    Location
    Belgium
    Beans
    1,528

    Re: About to give up on my server

    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.
    Disclaimer: I am currently suffering from severe CSD (Compulsive Sarcasm Disorder).
    My Site | Linux User #452328 | Running Arch Linux on Sony Vaio VGN-SZ61XN/C since October 2008

  3. #3
    Join Date
    Jan 2009
    Beans
    10

    Re: About to give up on my server

    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.

  4. #4
    Join Date
    Apr 2007
    Location
    Belgium
    Beans
    1,528

    Re: About to give up on my server

    What's the exact error apache gives?
    Disclaimer: I am currently suffering from severe CSD (Compulsive Sarcasm Disorder).
    My Site | Linux User #452328 | Running Arch Linux on Sony Vaio VGN-SZ61XN/C since October 2008

  5. #5
    Join Date
    Sep 2007
    Location
    Masschusetts
    Beans
    1,510
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: About to give up on my server

    /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>
    Last edited by DGortze380; March 8th, 2009 at 04:27 PM.
    Registered Linux User: 482377
    MacBook (1,1) - OS X Leopard
    ASUS P5LD2 - Core 2 Duo 3.0GHz - 2GB Corsair RAM - Nvidia 8800GT - Ubuntu 9.04 / Windows 7 Professional

  6. #6
    Join Date
    Apr 2008
    Location
    London, UK
    Beans
    590
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: About to give up on my server

    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>

  7. #7
    Join Date
    Sep 2007
    Location
    Masschusetts
    Beans
    1,510
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: About to give up on my server

    Quote Originally Posted by scottuss View Post
    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..
    Registered Linux User: 482377
    MacBook (1,1) - OS X Leopard
    ASUS P5LD2 - Core 2 Duo 3.0GHz - 2GB Corsair RAM - Nvidia 8800GT - Ubuntu 9.04 / Windows 7 Professional

  8. #8
    Join Date
    Apr 2008
    Location
    London, UK
    Beans
    590
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: About to give up on my server

    Quote Originally Posted by DGortze380 View Post
    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!

  9. #9
    Join Date
    Jan 2009
    Beans
    10

    Re: About to give up on my server

    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 ?

  10. #10
    Join Date
    Jun 2006
    Location
    Switzerland
    Beans
    Hidden!
    Distro
    Kubuntu Jaunty Jackalope (testing)

    Re: About to give up on my server

    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).

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •