logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Subdirectory Access for website
Author
Noneck



Joined: 27 Sep 2011
Posts: 2

PostPosted: Tue 27 Sep '11 21:23    Post subject: Subdirectory Access for website Reply with quote

Just loaded apache 2.2 on windows. Placed some html files in the default
directory /htdocs. All the images are stored in a subdirectory /htdocs/images
Needless to say the images do not appear and the log reports 404 access
denide. What directive / code do I use in the config file to grant my
Web pages access to the images directory
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Wed 28 Sep '11 1:10    Post subject: Reply with quote

You shouldn't need to do anything. if htdocs is accessible, everything below it should be unless you specifically told Apache otherwise.

What does the error log say about those 404 errors? It will give the path to file that it is not finding, that may help you figure it out. How are you linking the images in the say index.html file?
Back to top
Noneck



Joined: 27 Sep 2011
Posts: 2

PostPosted: Thu 29 Sep '11 13:49    Post subject: Reply with quote

What does the error log say about those 404 errors? It will give the path to file that it is not finding, that may help you figure it out. How are you linking the images in the say index.html file?[/quote]


Error Log:
127.0.0.1 - - [26/Sep/2011:19:49:33 -0700] "GET /i HTTP/1.1" 404 199
127.0.0.1 - - [26/Sep/2011:19:49:34 -0700] "GET /im HTTP/1.1" 404 200
127.0.0.1 - - [26/Sep/2011:19:49:34 -0700] "GET /ima HTTP/1.1" 404 201
127.0.0.1 - - [26/Sep/2011:19:49:34 -0700] "GET /imag HTTP/1.1" 404 202
127.0.0.1 - - [26/Sep/2011:19:49:34 -0700] "GET /image HTTP/1.1" 404 203
127.0.0.1 - - [26/Sep/2011:19:49:35 -0700] "GET /images HTTP/1.1" 301 232
127.0.0.1 - - [26/Sep/2011:19:49:35 -0700] "GET /images/ HTTP/1.1" 200 1890
71.00.00.000 - - [26/Sep/2011:20:34:02 -0700] "GET / HTTP/1.1" 200 6751
71.00.00.000 - - [26/Sep/2011:20:34:02 -0700] "GET /images/logo.jpg HTTP/1.1" 404 213
71.00.00.000 - - [26/Sep/2011:20:34:02 -0700] "GET /style.css HTTP/1.1" 200 7026
71.00.00.000 - - [26/Sep/2011:20:34:02 -0700] "GET /images/menu_1.gif HTTP/1.1" 404 215
71.00.00.000 - - [26/Sep/2011:20:34:02 -0700] "GET /images/menu_2.gif HTTP/1.1" 404 215
71.00.00.000 - - [26/Sep/2011:20:34:02 -0700] "GET /images/menu_4.gif HTTP/1.1" 404 215
71.00.00.000 - - [26/Sep/2011:20:34:02 -0700] "GET /images/menu_3.gif HTTP/1.1" 404 215
71.00.00.000 - - [26/Sep/2011:20:34:02 -0700] "GET /images/menu_5.gif HTTP/1.1" 404 215
71.00.00.000 - - [26/Sep/2011:20:34:02 -0700] "GET /images/menu_6.gif HTTP/1.1" 404 215
71.00.00.000 - - [26/Sep/2011:20:34:02 -0700] "GET /images/b_nav_3.jpg HTTP/1.1" 404 216

LAN and WAN report the same thing

html code:
<h1><a href="http://www.freewebsitetemplates.com"><img src="images/logo.jpg" width="286" height="114" alt="Web technologies Company" /></a></h1>
<ul id="nav">

I did notice that going to localhost/images will give me the directory listing so the folder is accessable
maybe its the html code?
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Sat 01 Oct '11 1:09    Post subject: Reply with quote

The ones from 127.0.0.1 is odd
/i
/im
/ima
etc.

/images however looks to be ok, 302 -> /images/

can you, from your browser go to
http://localhost/images/logo.jpg

probably not, but this is odd
Back to top


Reply to topic   Topic: Subdirectory Access for website View previous topic :: View next topic
Post new topic   Forum Index -> Apache