under drupal 6, Advanced CSS/JS Aggregation can enable async mode but when i use OPEN ATRIUM 1.0-beta10 it just doesn't work. Using nginx and php-fpm, below is the setting for drupal 6 in my conf file, and i use the same with OPEN ATRIUM but no sync mode enable option.

###
    ### advagg_css and advagg_js support
    ###
    location ~* advagg_(?:css|js)/ {
        access_log off;
        expires 365d;
        add_header Pragma "";
        add_header Cache-Control "public";
        try_files $uri @drupal;
    }

Comments

guruslot’s picture

The same effect with pressflow. Everything is set up according documentation.

rjbrown99’s picture

I'm not quite clear on async mode. My status page (Pressflow+CDN) says "Asynchronous mode: Set to FALSE." But then it continues "Check your CDN settings; request is not coming back when routed through the CDN."

What exactly does that mean?

mikeytown2’s picture

Title: Can't enable async mode with open atrium » Can't enable async mode with open atrium - Add in html comment to fast404 & check for that as well

@rjbrown99
Means origin pull is not hitting the missing handler. Code used to check CDN route

$filepath = $css_path . '/css_missing' . mt_rand() . '_0.css';
if (module_exists('cdn')) {
$url_cdn = file_create_url($filepath);
// Send request and also time it.
timer_start(__FUNCTION__ . 'cdn');
$data_cdn = drupal_http_request($url_cdn);
$time_cdn = timer_stop(__FUNCTION__ . 'cdn');
$mode = variable_get(CDN_MODE_VARIABLE, CDN_MODE_BASIC);
}

http://drupalcode.org/project/advagg.git/blob/refs/heads/6.x-1.x:/advagg...

I should set an html comment in the fast404 output as well; the CDN might be stripping some of the headers when forwarded.

rjbrown99’s picture

Well, in my case I have two levels of upstream caching. It goes like this:

CDN -> Varnish -> Apache/Drupal

Could it be that the check is failing because it hits varnish on the way back in?

mikeytown2’s picture

Thats why I have the mt_rand() call in there. It should be unique enough; I could add in a call to time() as well. My guess is stripped headers; I need to have a html comment in the advagg_fast404() function and check for that html comment OR the header.

rjbrown99’s picture

Yea perhaps the CDN and/or Varnish is removing headers - I haven't looked into it. But it's certainly possible. FWIW my CDN is Amazon CloudFront.

mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new2.41 KB

mind testing this patch?

spacereactor’s picture

#7 patch doesn't work for me, running openatrium and nginx.

mikeytown2’s picture

Status: Needs review » Fixed
StatusFileSize
new7.47 KB

committed this patch.

Flush your menu cache after applying it

mikeytown2’s picture

Component: Documentation » Code
Category: support » bug
spacereactor’s picture

test with the #9 patch, it work. sweet. THANK!! The 6.x-1.x-dev 2011-Apr-29 doesn't include this patch, you have to manually patch this.

_-.’s picture

after applying the patch, my status report:

Adv CSS/JS Agg - Asynchronous Mode Set to FALSE.
Check to see if you have fast 404s, if so create an exception for this module. The readme file explains what needs to be changed. You can try flushing the menu cache as well.
AdvAgg JS Compress - Callback The callback for testing if a JS file is compressible is not working.
As a result if jsmin+ encounters a file that it cannot compress, it will kill that PHP process.

I've not installed fast 404s
I've flushed all caches
The async option is still not selectable
The JS Compress-Callback error is new ...

mikeytown2’s picture

@dev001
what happens when you go to sites/default/files/advagg_css/missing.css when logged out?

_-.’s picture

ignore this. see cmt#16

mikeytown2’s picture

What's this doing in here?

Notice: Undefined index: dev_fusion in /srv/www/pf6/includes/theme.inc on line 59 Notice: Trying to get property of non-object in /srv/www/pf6/includes/theme.inc on line 92 Notice: Trying to get property of non-object in /srv/www/pf6/includes/theme.inc on line 219 Warning: require_once(./sites/all/modules/cck/theme/theme.inc): failed to open stream: No such file or directory in /srv/www/pf6/sites/all/modules/cck/content.module on line 177 Fatal error: require_once(): Failed opening required './sites/all/modules/cck/theme/theme.inc' (include_path='.:..:/srv/www/include:/usr/include/php5:/usr/include/php5/ext:/usr/include/php5/ext/pdo/:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/pf6/sites/all/modules/cck/content.module on line 177

YOU need to fix the fatal error ASAP

_-.’s picture

installing yet another new/clean test site,

drush pm-list | grep Enabled
	Initialized Drupal 6.20 root directory at /srv/www/pf6                                 [notice]
	Initialized Drupal site test.loc at sites/test.loc                                                     [notice]
	 Administration           Administration menu (admin_menu)                        Module  Enabled        6.x-3.x-dev
	 Administration           Cache browser (cache_browser)                           Module  Enabled        6.x-1.4
	 Advanced CSS/JS          AdvAgg Bundler (advagg_bundler)                         Module  Enabled        6.x-1.x-dev
	 Advanced CSS/JS          AdvAgg CDN Javascript (advagg_js_cdn)                   Module  Enabled        6.x-1.x-dev
	 Advanced CSS/JS          AdvAgg Compress CSS (advagg_css_compress)               Module  Enabled        6.x-1.x-dev
	 Advanced CSS/JS          AdvAgg Compress Javascript (advagg_js_compress)         Module  Enabled        6.x-1.x-dev
	 Advanced CSS/JS          Advanced CSS/JS Aggregation (advagg)                    Module  Enabled        6.x-1.x-dev
	 Caching                  Authcache (authcache)                                   Module  Enabled        6.x-1.x-dev
	 Caching                  Memcache Admin (memcache_admin)                         Module  Enabled        6.x-1.8
	 Caching                  Varnish (varnish)                                       Module  Enabled        6.x-1.x-dev
	 Core - optional          Color (color)                                           Module  Enabled        6.20
	 Core - optional          Comment (comment)                                       Module  Enabled        6.20
	 Core - optional          Database logging (dblog)                                Module  Enabled        6.20
	 Core - optional          Help (help)                                             Module  Enabled        6.20
	 Core - optional          Menu (menu)                                             Module  Enabled        6.20
	 Core - optional          Taxonomy (taxonomy)                                     Module  Enabled        6.20
	 Core - optional          Update status (update)                                  Module  Enabled        6.20
	 Core - required          Block (block)                                           Module  Enabled        6.20
	 Core - required          Filter (filter)                                         Module  Enabled        6.20
	 Core - required          Node (node)                                             Module  Enabled        6.20
	 Core - required          System (system)                                         Module  Enabled        6.20
	 Core - required          User (user)                                             Module  Enabled        6.20
	 Other                    Format Number API (format_number)                       Module  Enabled        6.x-1.6
	 Performance and          Cache Expiration (expire)                               Module  Enabled        6.x-1.x-dev
	 User interface           jQuery UI (jquery_ui)                                   Module  Enabled        6.x-1.x-dev
	 User interface           jQuery Update (jquery_update)                           Module  Enabled        6.x-2.x-dev
	 Other                    Garland (garland)                                       Theme   Enabled        6.20
	Command dispatch complete                                                                                    [notice]


with advagg* DISabled, everything works fine -- no errors reported @ site.

ENabling latest advagg*,

@ https://test.loc/admin

    Notice: Undefined property: stdClass::$data in advagg_check_missing_handler() (line 332 of /srv/www/pf6/sites/all/modules/advagg/advagg.install).
    Notice: Undefined variable: async in advagg_check_missing_handler() (line 371 of /srv/www/pf6/sites/all/modules/advagg/advagg.install).




@ https://test.loc/admin/reports/status

    Notice: Use of undefined constant JQUERY_UI_PATH - assumed 'JQUERY_UI_PATH' in advagg_get_jquery_ui_filename() (line 62 of /srv/www/pf6/sites/all/modules/advagg/advagg_js_cdn/advagg_js_cdn.module).
    Notice: Use of undefined constant JQUERY_UI_PATH - assumed 'JQUERY_UI_PATH' in advagg_get_jquery_ui_filename() (line 62 of /srv/www/pf6/sites/all/modules/advagg/advagg_js_cdn/advagg_js_cdn.module).
    Notice: Undefined property: stdClass::$data in advagg_check_missing_handler() (line 332 of /srv/www/pf6/sites/all/modules/advagg/advagg.install).
    Notice: Undefined variable: async in advagg_check_missing_handler() (line 371 of /srv/www/pf6/sites/all/modules/advagg/advagg.install).

Pressflow	6.20
Access to update.php	Protected
Adv CSS/JS Agg - Asynchronous Mode	Set to FALSE.
Check to see if you have fast 404s, if so create an exception for this module. The readme file explains what needs to be changed. You can try flushing the menu cache as well.
AdvAgg JS Compress - Callback	The callback for testing if a JS file is compressible is not working.
As a result if jsmin+ encounters a file that it cannot compress, it will kill that PHP process.


@ https://test.loc/sites/test.loc/files/advagg_css/missing.css
	Not Found
	
	The requested URL was not found on this server.
	
	Home

and, as above,

I've not installed fast 404s
I've flushed all caches
The async option is still not selectable

_-.’s picture

Status: Fixed » Active
mikeytown2’s picture

StatusFileSize
new2.22 KB

This patch will fix the notices; but it won't fix the issue your having. If you have more advagg notices/warnings send then along :)

Mind running this code and reporting the output of it between code tags?

  // Setup request
  list($css_path, $js_path) = advagg_get_root_files_dir();
  $ip = variable_get('advagg_server_addr', FALSE);
  if (empty($ip)) {
    $ip = empty($_SERVER['SERVER_ADDR']) ? '127.0.0.1' : $_SERVER['SERVER_ADDR'];
  }
  $filepath = $css_path . '/css_missing' . mt_rand() . time() . '_0.css';
  $url = 'http://' . $ip . $base_path . $filepath;
  $headers = array(
    'Host' => $_SERVER['HTTP_HOST'],
  );

  // Send request.
  $data = drupal_http_request($url, $headers);
  $data = array($data, $_SERVER);

  // print output.
  echo str_replace('    ', '    ', nl2br(htmlentities(print_r($data, TRUE))));
_-.’s picture

(@ a better provisioned site ...)

sites/all/modules/advagg
patch -p1 < ../advagg-1132878-18.patch
patching file advagg.install
patching file advagg_js_cdn/advagg_js_cdn.module

drush pm-list | grep -i advagg
...
Advanced CSS/JS Aggregation AdvAgg Bundler (advagg_bundler) Module Enabled 6.x-1.x-dev
Advanced CSS/JS Aggregation AdvAgg CDN Javascript (advagg_js_cdn) Module Enabled 6.x-1.x-dev
Advanced CSS/JS Aggregation AdvAgg Compress CSS (advagg_css_compress) Module Enabled 6.x-1.x-dev
Advanced CSS/JS Aggregation AdvAgg Compress Javascript (advagg_js_compress) Module Enabled 6.x-1.x-dev
Advanced CSS/JS Aggregation Advanced CSS/JS Aggregation (advagg) Module Enabled 6.x-1.x-dev
Command dispatch complete [notice]
...

drush cc all
service apache2-custom restart

nav to .../test.php. output:

Array
(
    [0] => stdClass Object
        (
            [code] => -111
            [error] => Connection refused
        )

    [1] => Array
        (
            [local_referral] => 1
            [UNIQUE_ID] => TbzGsX8AAAIAACsHMY4AAAAF
            [HTTP_AUTHORIZATION] =>
            [HTTP_HOST] => test.loc
            [HTTP_X_REAL_IP] => 10.12.1.106
            [HTTP_X_CLIENT_VERIFY] => SUCCESS
            [HTTP_USER_AGENT] => Mozilla/5.0 (X11; Linux x86_64; rv:2.0.0) Gecko/20100101 Firefox/4.0
            [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
            [HTTP_ACCEPT_LANGUAGE] => en-us,en;q=0.5
            [HTTP_ACCEPT_CHARSET] => UTF-8,*
            [HTTP_DNT] => 1
            [HTTP_ACCEPT_ENCODING] => gzip
            [HTTP_X_FORWARDED_FOR] => 127.0.0.1, 127.0.0.1
            [HTTP_X_VARNISH] => 1020874549
            [PATH] => /sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
            [SERVER_SIGNATURE] =>
            [SERVER_SOFTWARE] => Apache
            [SERVER_NAME] => test.loc
            [SERVER_ADDR] => 127.0.0.1
            [SERVER_PORT] => 80
            [REMOTE_ADDR] => 127.0.0.1
            [DOCUMENT_ROOT] => /srv/www/pf6
            [SERVER_ADMIN] => dev001@dev001.loc
            [SCRIPT_FILENAME] => /srv/www/pf6/index.php
            [REMOTE_PORT] => 48880
            [GATEWAY_INTERFACE] => CGI/1.1
            [SERVER_PROTOCOL] => HTTP/1.1
            [REQUEST_METHOD] => GET
            [QUERY_STRING] =>
            [REQUEST_URI] => /
            [SCRIPT_NAME] => /index.php
            [PHP_SELF] => /index.php
            [REQUEST_TIME] => 1304217265
            [argv] => Array
                (
                )

            [argc] => 0
        )

)
_-.’s picture

fyi, after patching, still @, e.g., http://test.loc/user/1,

Notice: Use of undefined constant JQUERY_UI_PATH - assumed 'JQUERY_UI_PATH' in advagg_get_jquery_ui_filename() (line 61 of /srv/www/pf6/sites/all/modules/advagg/advagg_js_cdn/advagg_js_cdn.module).
Notice: Use of undefined constant JQUERY_UI_PATH - assumed 'JQUERY_UI_PATH' in advagg_get_jquery_ui_filename() (line 61 of /srv/www/pf6/sites/all/modules/advagg/advagg_js_cdn/advagg_js_cdn.module).

mikeytown2’s picture

StatusFileSize
new2.26 KB

Trying a different way to get rid of the notice; patch is against dev.

try this code as well; forgot the global base_path

  global $base_path;

  // Setup request
  list($css_path, $js_path) = advagg_get_root_files_dir();
  $ip = variable_get('advagg_server_addr', FALSE);
  if (empty($ip)) {
    $ip = empty($_SERVER['SERVER_ADDR']) ? '127.0.0.1' : $_SERVER['SERVER_ADDR'];
  }
  $filepath = $css_path . '/css_missing' . mt_rand() . time() . '_0.css';
  $url = 'http://' . $ip . $base_path . $filepath;
  $headers = array(
    'Host' => $_SERVER['HTTP_HOST'],
  );

  // Send request.
  $data = drupal_http_request($url, $headers);
  $data = array($data, $_SERVER);

  // print output.
  echo str_replace('    ', '&nbsp;&nbsp;&nbsp;&nbsp;', nl2br(htmlentities(print_r($data, TRUE))));
_-.’s picture

drush dl advagg-6.x-1.x-dev
cd advagg
patch -p1 < ../advagg-1132878-21.patch

no more 'notices' seen. that worked, thx.

test code -->

Array


(
    [0] => stdClass Object
        (
            [code] => -111
            [error] => Connection refused
        )

    [1] => Array
        (
            [local_referral] => 1
            [UNIQUE_ID] => TbzVxH8AAAIAACx8GVEAAAAN
            [HTTP_AUTHORIZATION] =>
            [HTTP_HOST] => test.loc
            [HTTP_X_REAL_IP] => 10.12.1.106
            [HTTP_X_CLIENT_VERIFY] => SUCCESS
            [HTTP_HTTPS] => on
            [HTTP_USER_AGENT] => Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
            [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
            [HTTP_ACCEPT_LANGUAGE] => en-us,en;q=0.5
            [HTTP_ACCEPT_CHARSET] => UTF-8,*
            [HTTP_DNT] => 1
            [HTTP_ACCEPT_ENCODING] => gzip
            [HTTP_X_FORWARDED_FOR] => 127.0.0.1, 127.0.0.1
            [HTTP_X_VARNISH] => 1020874585
            [PATH] => /sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
            [SERVER_SIGNATURE] =>
            [SERVER_SOFTWARE] => Apache
            [SERVER_NAME] => test.loc
            [SERVER_ADDR] => 127.0.0.1
            [SERVER_PORT] => 80
            [REMOTE_ADDR] => 127.0.0.1
            [DOCUMENT_ROOT] => /srv/www/pf6
            [SERVER_ADMIN] => dev001@dev001.loc
            [SCRIPT_FILENAME] => /srv/www/pf6/index.php
            [REMOTE_PORT] => 60810
            [GATEWAY_INTERFACE] => CGI/1.1
            [SERVER_PROTOCOL] => HTTP/1.1
            [REQUEST_METHOD] => GET
            [QUERY_STRING] =>
            [REQUEST_URI] => /
            [SCRIPT_NAME] => /index.php
            [PHP_SELF] => /index.php
            [REQUEST_TIME] => 1304221124
            [argv] => Array
                (
                )

            [argc] => 0
        )

)
mikeytown2’s picture

I've committed the above patch... now to figure out why PHP isn't connecting to it's self. Let's try it without the IP address

  global $base_path;

  // Setup request
  list($css_path, $js_path) = advagg_get_root_files_dir();
  $filepath = $css_path . '/css_missing' . mt_rand() . time() . '_0.css';
  $url = 'http://' . $_SERVER['HTTP_HOST'] . $base_path . $filepath;

  // Send request.
  $data = drupal_http_request($url);
  $data = array($data, $_SERVER);

  // print output.
  echo str_replace('    ', '&nbsp;&nbsp;&nbsp;&nbsp;', nl2br(htmlentities(print_r($data, TRUE))));
_-.’s picture

Array
(
    [0] => stdClass Object
        (
            [request] => GET /sites/test.loc/files/advagg_css/css_missing10310664011304223422_0.css HTTP/1.0
Host: test.loc
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.0.0</center>
</body>
</html>

            [protocol] => HTTP/1.1
            [status_message] => Not Found
            [headers] => Array
                (
                    [Server] => nginx/1.0.0
                    [Date] => Sun, 01 May 2011 04:17:03 GMT
                    [Content-Type] => text/html
                    [Connection] => close
                    [Content-Length] => 168
                )

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

    [1] => Array
        (
            [local_referral] => 1
            [UNIQUE_ID] => Tbzevn8AAAIAACrcAo4AAAAC
            [HTTP_AUTHORIZATION] => Digest username="hostmaster", realm="AUTH test.loc", nonce="C+wj...f319", uri="/", algorithm=MD5, response="e7d3...50b9", qop=auth, nc=0000002d, cnonce="201b...b378"
            [HTTP_HOST] => test.loc
            [HTTP_X_REAL_IP] => 10.12.1.106
            [HTTP_X_CLIENT_VERIFY] => SUCCESS
            [HTTP_HTTPS] => on
            [HTTP_USER_AGENT] => Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
            [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
            [HTTP_ACCEPT_LANGUAGE] => en-us,en;q=0.5
            [HTTP_ACCEPT_CHARSET] => UTF-8,*
            [HTTP_DNT] => 1
            [HTTP_COOKIE] => has_js=1; SESS2763...225d; nocache=1; drupal_user=admin; drupal_uid=1; nocache_temp=1
            [HTTP_IF_MODIFIED_SINCE] => Sun, 01 May 2011 03:42:17 +0000
            [HTTP_IF_NONE_MATCH] => "1304221337"
            [HTTP_CACHE_CONTROL] => max-age=0
            [HTTP_X_FORWARDED_FOR] => 127.0.0.1
            [HTTP_ACCEPT_ENCODING] => gzip
            [HTTP_X_VARNISH] => 1020874647
            [PATH] => /sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
            [SERVER_SIGNATURE] =>
            [SERVER_SOFTWARE] => Apache
            [SERVER_NAME] => test.loc
            [SERVER_ADDR] => 127.0.0.1
            [SERVER_PORT] => 80
            [REMOTE_ADDR] => 127.0.0.1
            [DOCUMENT_ROOT] => /srv/www/pf6
            [SERVER_ADMIN] => dev001@dev001.loc
            [SCRIPT_FILENAME] => /srv/www/pf6/index.php
            [REMOTE_PORT] => 43397
            [GATEWAY_INTERFACE] => CGI/1.1
            [SERVER_PROTOCOL] => HTTP/1.0
            [REQUEST_METHOD] => GET
            [QUERY_STRING] =>
            [REQUEST_URI] => /
            [SCRIPT_NAME] => /index.php
            [PHP_SELF] => /index.php
            [PHP_AUTH_DIGEST] => username="hostmaster", realm="AUTH test.loc", nonce="C+wj...f319", uri="/", algorithm=MD5, response="e7d3...50b9", qop=auth, nc=0000002d, cnonce="201b...b378"
            [REQUEST_TIME] => 1304223422
            [argv] => Array
                (
                )

            [argc] => 0
        )

)
mikeytown2’s picture

hmmm interesting problem... more core for you to run. If your wondering fsockopen is throwing the -111 error when trying to connect to 127.0.0.1

  global $base_path;
  $data = array();
  
  // Setup request.
  list($css_path, $js_path) = advagg_get_root_files_dir();
  $ip = variable_get('advagg_server_addr', FALSE);
  if (empty($ip)) {
    $ip = empty($_SERVER['SERVER_ADDR']) ? '127.0.0.1' : $_SERVER['SERVER_ADDR'];
  }
  $filepath = $css_path . '/css_missing' . mt_rand() . time() . '_0.css';
  $url = 'http://' . $ip . $base_path . $filepath;
  $headers = array(
    'Host' => $_SERVER['HTTP_HOST'],
  );

  // Send request.
  $data[] = drupal_http_request($url, $headers);
  $data[] = $url;
  $data[] = $_SERVER;


  // Setup request.
  $url = 'http://' . $_SERVER['HTTP_HOST'] . $base_path . $filepath;
  // Send request.
  $data[] = drupal_http_request($url);
  $data[] = $url;
  $data[] = dns_get_record($_SERVER['HTTP_HOST']);

  // print output.
  echo str_replace('    ', '&nbsp;&nbsp;&nbsp;&nbsp;', nl2br(htmlentities(print_r($data, TRUE))));
_-.’s picture

atm,

Fatal error: Cannot use object of type stdClass as array in /srv/www/pf6/sites/test.loc/themes/test_fusion/page.tpl.php on line 85

where, your snippet pasted into 'page.tpl.php' @,

	81	  );
	82
	83	  // Send request.
	84	  $data = drupal_http_request($url, $headers);
-->	85	  $data[] = $url;
	86	  $data[] = $_SERVER;
mikeytown2’s picture

I edited the post a couple of minutes after initially posting; get the code again :)

rjbrown99’s picture

You guys need to get on irc at this point - it would make things easier :)

_-.’s picture

thx; re-got the code.

Array
(
    [0] => stdClass Object
        (
            [code] => -111
            [error] => Connection refused
        )

    [1] => http://127.0.0.1/sites/test.loc/files/advagg_css/css_missing6983891241304229668_0.css
    [2] => Array
        (
            [local_referral] => 1
            [UNIQUE_ID] => Tbz3In8AAAIAACrdAvUAAAAD
            [HTTP_AUTHORIZATION] => Digest username="hostmaster", realm="AUTH test.loc", nonce="C+wj...f319", uri="/", algorithm=MD5, response="5937...55ad", qop=auth, nc=00000083, cnonce="7656...8a4b"
            [HTTP_HOST] => test.loc
            [HTTP_X_REAL_IP] => 10.12.1.106
            [HTTP_X_CLIENT_VERIFY] => SUCCESS
            [HTTP_HTTPS] => on
            [HTTP_USER_AGENT] => Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
            [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
            [HTTP_ACCEPT_LANGUAGE] => en-us,en;q=0.5
            [HTTP_ACCEPT_CHARSET] => UTF-8,*
            [HTTP_DNT] => 1
            [HTTP_COOKIE] => has_js=1; SESS2763...225d
            [HTTP_IF_MODIFIED_SINCE] => Sun, 01 May 2011 05:46:57 +0000
            [HTTP_IF_NONE_MATCH] => "1304228817"
            [HTTP_CACHE_CONTROL] => max-age=0
            [HTTP_X_FORWARDED_FOR] => 127.0.0.1
            [HTTP_ACCEPT_ENCODING] => gzip
            [HTTP_X_VARNISH] => 1020874744
            [PATH] => /sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
            [SERVER_SIGNATURE] =>
            [SERVER_SOFTWARE] => Apache
            [SERVER_NAME] => test.loc
            [SERVER_ADDR] => 127.0.0.1
            [SERVER_PORT] => 80
            [REMOTE_ADDR] => 127.0.0.1
            [DOCUMENT_ROOT] => /srv/www/pf6
            [SERVER_ADMIN] => dev001@dev001.loc
            [SCRIPT_FILENAME] => /srv/www/pf6/index.php
            [REMOTE_PORT] => 46959
            [GATEWAY_INTERFACE] => CGI/1.1
            [SERVER_PROTOCOL] => HTTP/1.0
            [REQUEST_METHOD] => GET
            [QUERY_STRING] =>
            [REQUEST_URI] => /
            [SCRIPT_NAME] => /index.php
            [PHP_SELF] => /index.php
            [PHP_AUTH_DIGEST] => username="hostmaster", realm="AUTH test.loc", nonce="C+wj...f319", uri="/", algorithm=MD5, response="5937...55ad", qop=auth, nc=00000083, cnonce="7656...8a4b"
            [REQUEST_TIME] => 1304229666
            [argv] => Array
                (
                )

            [argc] => 0
        )

    [3] => stdClass Object
        (
            [request] => GET /sites/test.loc/files/advagg_css/css_missing6983891241304229668_0.css HTTP/1.0
Host: test.loc
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.0.0</center>
</body>
</html>

            [protocol] => HTTP/1.1
            [status_message] => Not Found
            [headers] => Array
                (
                    [Server] => nginx/1.0.0
                    [Date] => Sun, 01 May 2011 06:01:08 GMT
                    [Content-Type] => text/html
                    [Connection] => close
                    [Content-Length] => 168
                )

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

    [4] => http://test.loc/sites/test.loc/files/advagg_css/css_missing6983891241304229668_0.css
    [5] => Array
        (
            [0] => Array
                (
                    [host] => test.loc
                    [type] => A
                    [ip] => 10.12.1.110
                    [class] => IN
                    [ttl] => 30
                )

            [1] => Array
                (
                    [host] => test.loc
                    [type] => MX
                    [pri] => 10
                    [target] => smtp1.infra.loc
                    [class] => IN
                    [ttl] => 30
                )

            [2] => Array
                (
                    [host] => test.loc
                    [type] => MX
                    [pri] => 20
                    [target] => smtp2.infra.loc
                    [class] => IN
                    [ttl] => 30
                )

            [3] => Array
                (
                    [host] => test.loc
                    [class] => IN
                    [ttl] => 30
                )

        )

)
mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new4.87 KB

apply this patch; set "IP Address to send all asynchronous requests to" on the admin/settings/advagg/config page to -1 and make sure you have an Nginx rule in place like this http://drupal.org/node/1116618#comment-4321724

_-.’s picture

re: the nginx 'location ~* advagg_(?:css|js)/ { ...' stanza, iiuc, that makes sense if nginx is actually doing the serving.

in my case, nginx front-ends, passes through varnish, and apache/drupal serves up. e.g., my nginx conf includes,

...
upstream varnishPF6 {
 server 127.0.0.1:10100;
}
server {
 listen 10.12.1.106:80;
 server_name   test.loc;
 rewrite ^(.*) https://test.loc$1 permanent;
 break;
}
server {
 listen 10.12.1.106:443 default;
 ssl on;
 server_name test.loc;
 root /var/empty;
 access_log /var/log/nginx/access.log main;
 rewrite_log on;
 ssl_verify_client off;
 ssl_certificate "/srv/ssl/test.loc.crt";
 ssl_certificate_key "/srv/ssl/test.loc.key";
 ssl_session_cache shared:SSL:4m;
 ssl_session_timeout 5m;
 ssl_prefer_server_ciphers on;
 location / {
  proxy_pass http://varnishPF6;
  proxy_redirect off;
  proxy_set_header Host $host;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header HTTPS on;
  proxy_set_header X-SSL-Subject $ssl_client_s_dn;
  proxy_set_header X-SSL-Issuer  $ssl_client_i_dn;
  proxy_set_header X-Client-Verify SUCCESS;
 }
}
...

i'm hardly clear here, but wouldn't the referenced stanza, or equivalent, need to go -- in this scenario -- "in" the apache config?

mikeytown2’s picture

unless you have some very aggressive htaccess settings that are not the default, apache doesn't need anything to be done to it, in order to make it work. Most Nginx setups are fairly aggressive on the other hand and have an exception for imagecache; thus you then need to create an exception for advagg as well.

mikeytown2’s picture

going to commit this patch as it will allow for a work around with a similar issue #1142990: Why SERVER_ADDR is used instead of HTTP_HOST to build $url in function advagg_css_js_file_builder() ?

mikeytown2’s picture

going to mark this as fixed as this is most likely a server configuration issue now

mikeytown2’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.