Results 1 to 5 of 5

Thread: ubuntu server 14.0 webserver help!!

  1. #1
    Join Date
    May 2014
    Beans
    2

    ubuntu server 14.0 webserver help!!

    i having a hard time triying to configure apache2 i re-code index.html and add some picture for some reason i can see the web site but not images at all please i need some help. thank you

    <img src="/var/www/html/ms1.jpg" alt="musicianspaces" width="1075" height="600">

    sudo chmod 777 /var/www/html/ms1.jpg

  2. #2
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    2,236
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: ubuntu server 14.0 webserver help!!

    Instead of this
    Code:
    <img src="/var/www/html/ms1.jpg" alt="musicianspaces" width="1075" height="600">
    do this
    Code:
    <img src="./ms1.jpg" alt="musicianspaces" width="1075" height="600">
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

  3. #3
    Join Date
    May 2014
    Beans
    2

    Re: ubuntu server 14.0 webserver help!!

    damm one dot revolved hours of headches thanks a lot

  4. #4
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    11,404
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: ubuntu server 14.0 webserver help!!

    Well, the more important reason is that <img src> requires the URL, not the path on the local computer. All the links in an HTML document use the external URL addresses. It's not because of the dot, it's because
    Code:
    ./ms1.jpg
    is a relative URL. It expands to
    Code:
    http://www.example.com/ms1.jpg
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  5. #5
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    2,236
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: ubuntu server 14.0 webserver help!!

    @ Seiji : Thanks. I was in a hurry when I replied and didn't give the expanded explanation. I had meant to come back and give more information.

    If I might take it a step further, the original link would have looked for this file: /var/www/html/var/www/html/ms1.jpg
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

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
  •