Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I have Pressflow 6 and Nginx. Asynchronous Mode is always False.
Debug info:
http://127.0.0.1/site/sites/default/files/advagg_css/css_missing56085193...
stdClass Object (
[code] => -111
[error] => Connection refused
[timer] => Array (
[count] => 1
[time] => 0.37
)
)
File css_5608519351317939125_0.css (or any other showed here) is never exist in advagg_css folder.
Any ideas how to fix that?
Comment | File | Size | Author |
---|---|---|---|
#7 | nginx.zip | 1.39 KB | superfedya |
#7 | mysite.zip | 817 bytes | superfedya |
#5 | nginx.zip | 13.18 KB | Peter Bowey |
Comments
Comment #1
superfedya CreditAttribution: superfedya commentedI put IP Address to send all asynchronous requests to: -1 and now is a new error:
In my Nginx I pasted:
Comment #2
Peter Bowey CreditAttribution: Peter Bowey commentedPlease see omega8cc's setup for Drupal + Nginx + Advagg!
I have placed a direct link to the file that will help you
with the best setup:
https://github.com/omega8cc/nginx-for-drupal/blob/master/aegir/conf/ngin...
Comment #3
superfedya CreditAttribution: superfedya commentedMy logs:
2011/10/07 01:28:37 [error] 30140#0: *368 could not find named location "@drupal", client: 47.4.91.18, server: mysite.com, request: "GET /site/sites/default/files/advagg_css/css_missing4083484831317943717_0.css HTTP/1.0", host: "www.mysite.com"
peter bowey
Thanks!
But always same error: could not find named location "@drupal"
If I erase this line I got 404 error: try_files $uri @drupal;
Any suggestion?
Thanks!
Comment #4
Peter Bowey CreditAttribution: Peter Bowey commentedYou could be using a older Nginx that does not support "named locations"
- Else, you have a error in the nginx.conf.
I am happily using the same Pressflow + Advagg as you.
Yes, I have [once] been through the same issues as you have reported :-)
The nginx 500 error simply means 'misconfiguration' [something illegal within nginx.conf]
Comment #5
Peter Bowey CreditAttribution: Peter Bowey commentedDoes it help if I attach my working nginx.conf file for you to study?
Comment #6
Peter Bowey CreditAttribution: Peter Bowey commentedComment #7
superfedya CreditAttribution: superfedya commentedMy nginx support it. I added the line:
When I add it it shows:
Maybe because my drupal in /site folder. So I add:
No result.
I attach my config, maybe somebody can tell me what the problem...
Thanks
Comment #8
superfedya CreditAttribution: superfedya commented>Does it help if I attach my working nginx.conf file for you to study?
It's too complicated O__O
Hmmm, this line:
location @drupal {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
How can I modify it too add a sub-folder? If I do something like: rewrite ^site/(.*)$ /index.php?q=$1 last; I got nginx error:
This path is completely wrong:
/usr/local/nginx//html/site/sites/default/files/advagg_css/css_missing6730073131317950516_0.css
Must be:
/var/www/mysite.com/site/sites/default/files/advagg_css/css_missing6730073131317950516_0.css
How can I fix it?
Comment #9
Peter Bowey CreditAttribution: Peter Bowey commentedSee this page:
http://drupal.org/node/1189002
Comment #10
Peter Bowey CreditAttribution: Peter Bowey commentedSwitch to the latest advagg devel version:
http://drupal.org/node/1066530
Comment #11
superfedya CreditAttribution: superfedya commentedI disable CDN and don't think that this module create this problem. 100% it's my bad nginx config X_X
Thanks
Comment #12
superfedya CreditAttribution: superfedya commented>Switch to the latest advagg devel version:
Done. Same error.
Comment #13
Peter Bowey CreditAttribution: Peter Bowey commentedI had a quick look at your two config files: [messy code *smile*]
"They both need a clean rewrite"
Why not use one of the above [working examples] to get a clean working nginx config?
Also the named location should be moved to after the caller [ref]!
If those two files are your total setup for nginx; there is a lot of 'normal' nginx handling missing...
A sound structure is required, I think.
Comment #14
Peter Bowey CreditAttribution: Peter Bowey commentedRefer #8:
The code [above] is not correct for any folder(s), as we *must* use /index.php in the D6 web root.
This code *is* correct, regardless of what folder(s):
The folder locations are handled by index.php (and the 'args' supplied) - assuming it is non-static (php) GET
You may be referring to multi-site domains + folders?
The
results because of your nginx setup (as I read it in the two attached files). You are defaulting to the nginx install / config location - rather than the www location.
Comment #15
superfedya CreditAttribution: superfedya commentedOk thanks, ill try to rewrite my config this weekends :)
>You may be referring to multi-site domains + folders?
Only folders.
Comment #16
superfedya CreditAttribution: superfedya commentedOne more question - above Nginx config will work if I don't have php FastCGI via Nginx?
Thanks
Comment #17
Peter Bowey CreditAttribution: Peter Bowey commentedRefer: # 16
You will need pickup and deal with the references to 'fastcgi' compared to your current 'PHP proxy bypass' to apache!
The difference is not too much! Basically, your current method is employing the older + traditional nginx proxy bypass to let apache handle the PHP 'grunt work'. With PHP5.3.x, the nginx fastCGI PHP is much preferred [over apache].
Think seriously [soon - when you are code ready] to moving everything [via http] over to nginx, and dropping apache.
There are great benefits.
I have been on the same progressive path you are treading this day. It is worth your time to flow with it - step -by- step.
You are not alone, many walk with you :-)
Comment #18
superfedya CreditAttribution: superfedya commentedThanks!
But if ill transfer my apache php to nginx php-fpm it will scrap all my php settings - memcache, apc? Nginx doesn’t work well with .httacces? All Drupal modules work well with this config?
There is some instruction to transfer the PHP from Apache to Nginx?
Or I can just :
apt-get install php5-fpm php5-cgi
And configure my nginx after? Or I need to setup up something else?
There is any other pittfalls?
Comment #19
Peter Bowey CreditAttribution: Peter Bowey commentedNo, all the above PHP modules are OK. Nginx does not need or use .htaccess. You implement your own nginx .htaccess methods, and they are documented [but you will need read a lot].
I see that you must be using a Debian / Fedora / Ubuntu Linux: so just use "apt-get install php5-fpm"
See: http://www.howtoforge.com/installing-php-5.3-nginx-and-php-fpm-on-ubuntu...
and: https://github.com/perusio/drupal-with-nginx [a very skilled nginx supporter]
another older pointer: http://wiki.nginx.org/Drupal
Comment #20
mikeytown2 CreditAttribution: mikeytown2 commented@superfedya
Fixing this issue here will hopefully fix your other issue here #1138098-31: Pre generation kills the machine. Both modules use the same idea; issue a secondary request to do background processing.
Comment #21
superfedya CreditAttribution: superfedya commentedmikeytown2
Thank you! I'll try.
Comment #22
mikeytown2 CreditAttribution: mikeytown2 commentedPostponing this issue as I haven't heard anything. If everything is working, go ahead and close this issue.
Comment #23
vinoth.3v CreditAttribution: vinoth.3v commentedsame here.
My nginx is with in reverse proxy. So localhost connection always will be refused.
reverse_proxy enabled in Drupal.
any help?
Comment #24
mikeytown2 CreditAttribution: mikeytown2 commentedClosing out older issues.