This is a discussion on Apache 2.2.0 Not serving .js , .css and image files within the Apache Web Server forums, part of the Web Server and Related Forums category; I just installed 2.2.0 with php5.1.2. None of the js, css and image files are getting ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I just installed 2.2.0 with php5.1.2. None of the js, css and image files are getting included on my pages. I looked at the access_log and requests to these files show all 200. So went into shell and used GET on one of the css files, response was 200 again but no content. This is driving me crazy, I re-comlided the server at least 5 times. I suspect it is some sorf of a permission issue but can't figure it out.. Files have the right permissions. One think I should mention, when put the full path to an image on the browser it displays the path to that image instead of rendering the image.. Thank you in advance, Ojeez |
|
|||
|
Ojeez wrote:
> I just installed 2.2.0 with php5.1.2. None of the js, css and image > files are getting included on my pages. I looked at the access_log and The pages you did request - were those static pages or dynamically generated ones? Is there a byte size logged in the access log for your images/css/etc.? -- Robert |
|
|||
|
thanks for the reply Robert,
these are ll static pages, I include them in the <head> tags with href or src attribute. I do not see the byte size information but, I expect it to be 0 since when I did a GET in shell I got nothing back. thanks Ey |
|
|||
|
I had this exact same problem a few weeks back and was sooo frustrated
not to be able to find anyone to share my pain. I didn't find a solution other than rolling back to Apache 2.0.55 which works just fine. This was all on my RHEL3 VPS. I did the exact same 2.2.0 compile on a RHEL3 system at work and it works fine so I guess there must be something about the setup on the VPS machine which is screwey. |
|
|||
|
I have just had another stab at this. I'm still getting the same odd
behaviour but looking in the acces_log I see error code 206 for each image. This error is described as follows: "206 Partial Content The server has fulfilled the partial GET request for the resource. The request MUST have included a Range header field indicating the desired range, and MAY have included an If-Range header field to make the request conditional. I'm really none the wiser... Anyone have any ideas? |
|
|||
|
I have just had another stab at this. Following a fresh compile of
Apache 2.2.0 I'm still getting the same odd behaviour but looking in the access_log I see error code 206 for each image. This error is defined as follows: "206 Partial Content The server has fulfilled the partial GET request for the resource. The request MUST have included a Range header field indicating the desired range, and MAY have included an If-Range header field to make the request conditional. I'm really none the wiser... Anyone have any ideas? |
|
|||
|
OK success! I upped the loglevel to "debug" in httpd.conf. When trying
to access images the following messages appeared in error_log: (38)Function not implemented: core_output_filter: writing data to the network A google search later and I found the following explanation of this error: "Apache uses the sendfile syscall on platforms where it is available in order to speed sending of responses. Unfortunately, on some systems, Apache will detect the presence of sendfile at compile-time, even when it does not work properly. This happens most frequently when using network or other non-standard file-system. Symptoms of this problem include the above message in the error log and zero-length responses to non-zero-sized files. The problem generally occurs only for static files, since dynamic content usually does not make use of sendfile. To fix this problem, simply use the EnableSendfile directive to disable sendfile for all or part of your server. Also see the EnableMMAP, which can help with similar problems." After setting "EnableSendfile off" in httpd.conf and restarting httpd it works as it should. |
| Thread Tools | |
| Display Modes | |
|
|