0

I have the following errors displayed on my status report page:

Adv CSS/JS Agg - HTTP Request   HTTP requests to advagg for js files are not getting through.
AdvAgg will issue a request for a file that does not exist inside of the AdvAgg directory. If AdvAgg sends a 404, everything is ok; if something else sends a 404 then that means that AdvAgg will not be able to generate an aggregate if it is missing as something else is handling the 404 before AdvAgg has a chance to do it. If you are reading this, it means that something else is handling the 404 before AdvAgg can. Raw request info:

stdClass Object
(
    [request] => GET /sites/default/files/advagg_js/js__1407579810.js HTTP/1.0
Host: www.example.com
Connection: close
Referer: https://www.example.com/admin/reports/status
User-Agent: Drupal (+http://drupal.org/)


    [data] => <html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.4.6 (Ubuntu)</center>
</body>
</html>

    [protocol] => HTTP/1.1
    [status_message] => Not Found
    [headers] => Array
        (
            [server] => nginx/1.4.6 (Ubuntu)
            [date] => Sat, 09 Aug 2014 10:23:31 GMT
            [content-type] => text/html
            [content-length] => 177
            [connection] => close
        )

    [code] => 404
    [error] => Not Found
)

and

Adv CSS/JS Agg - HTTP Request   HTTP requests to advagg for css files are not getting through.
AdvAgg will issue a request for a file that does not exist inside of the AdvAgg directory. If AdvAgg sends a 404, everything is ok; if something else sends a 404 then that means that AdvAgg will not be able to generate an aggregate if it is missing as something else is handling the 404 before AdvAgg has a chance to do it. If you are reading this, it means that something else is handling the 404 before AdvAgg can. Raw request info:

stdClass Object
(
    [request] => GET /sites/default/files/advagg_css/css__1407579810.css HTTP/1.0
Host: www.example.com
Connection: close
Referer: https://www.example.com/admin/reports/status
User-Agent: Drupal (+http://drupal.org/)


    [data] => <html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.4.6 (Ubuntu)</center>
</body>
</html>

    [protocol] => HTTP/1.1
    [status_message] => Not Found
    [headers] => Array
        (
            [server] => nginx/1.4.6 (Ubuntu)
            [date] => Sat, 09 Aug 2014 10:23:31 GMT
            [content-type] => text/html
            [content-length] => 177
            [connection] => close
        )

    [code] => 404
    [error] => Not Found
)

I was thinking that this may be due to ubuntu/nginx handling the error messages before drupal could handle it. My questions are: 1. Is it correct?

  1. If yes, how can I solve this error?

  2. Will making drupal handle all 404 errors create any performance/security implications on the server? Will this improve the performance of the website?

Any help will be greatly appreciated.

Edit: Here is a link to my present nginx configuration file:

location: /etc/nginx/sites-available/www.example.com.vhost

http://pastebin.com/7Unp0qbc

3

Workflow of AdvAgg is (as far as I understand) is to create a file URL when it's needed, and create file itself when it's requested.

Your nginx should forward non-existing JS / CSS requests to Drupal. Configure it to do so, and you should be OK.

  • 1
    This is correct, you can find an example of the appropriate nginx rule here – Clive Aug 9 '14 at 13:52
0

Solved the problem by asking nginx to forward all 404s to drupal so that 404s can be handled at the level of drupal itself. So I added the following to my www.example.com.vhost file located at /etc/nginx/sites-available

error_page 404 /index.php

This will ensure that all 404s are handled by drupal. This made the error messages to disappear (even though now I am getting a

Self Request Failure HTTP loopback requests to this server are returning a non positive response code of -1002

error which I think is unrelated).

0

You can safely add this to your settings.php file.

   $conf['advagg_skip_404_check'] = TRUE;

It'll definitely help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.