Show all posts by user
Introduce yourselves
Hmmm....
A couple of things. First, your configuration has some issues. I didn't look that closely at it last night because I was focused on that specific URI.
These parts are redundant:
# this serves static files that exist without running other rewrite tests
if (-f $request_filename) {
expires 30d;
break;
}
and
try_file
by
Jim Ohlstein
-
How to...
If it's written with the space ( "http://mysite.com/products/green chair" ) nginx will not accept it.
by
Jim Ohlstein
-
How to...
I would think so (I've never used it) but it would have to look something like:
location /foo {
fastcgi_pass 127.0.0.1:9000
if ($request_body ~* "notwanted" ) {
return 403;
}
...
}
or
location /foo {
proxy_pass http://127.0.0.1:8080
if ($request_body ~* "notwanted" ) {
return 403;
}
...
}
by
Jim Ohlstein
-
How to...
Igor Sysoev wrote:
> No, last miss will be MISS, while the previous ones will be COUNTING.
> In case "..._cache_min_uses 1" the first will be MISS, since it's
> the last miss. In "..._cache_min_uses 2": COUNTING, MISS.
>
>
Sounds good. Thanks Igor.
Jim
by
Jim Ohlstein
-
Nginx Mailing List - English
Igor Sysoev wrote:
> On Tue, Jul 14, 2009 at 09:26:22AM -0400, Jim Ohlstein wrote:
>
>
>> Igor Sysoev wrote:
>>
>>> On Mon, Jul 13, 2009 at 11:09:34PM -0400, Jim Ohlstein wrote:
>>>
>>>
>>>
>>>> It is now logging "HIT" or "MISS" for each request in that location block.
>>>&
by
Jim Ohlstein
-
Nginx Mailing List - English
Igor Sysoev wrote:
> On Mon, Jul 13, 2009 at 11:09:34PM -0400, Jim Ohlstein wrote:
>
>
>> It is now logging "HIT" or "MISS" for each request in that location block.
>>
>> It is safe to assume that with fastcgi_cache_min_uses set at 2 that for
>> every first miss shared memory is allocated, that the file is written to
>> the ca
by
Jim Ohlstein
-
Nginx Mailing List - English
See http://wiki.nginx.org/NginxHttpCoreModule#.24request_body .
You need to be running nginx 0.7.58 or later.
by
Jim Ohlstein
-
How to...
Maxim Dounin wrote:
> Hello!
>
> On Mon, Jul 13, 2009 at 08:45:03PM -0400, Jim Ohlstein wrote:
>
>
>> Igor Sysoev wrote:
>>
>>> On Mon, Jul 13, 2009 at 04:02:06PM -0400, Jim Ohlstein wrote:
>>>
>>>
>>>
>>>> Igor Sysoev wrote:
>>>>
>>>>
>>>>&g
by
Jim Ohlstein
-
Nginx Mailing List - English
Igor Sysoev wrote:
> On Mon, Jul 13, 2009 at 04:02:06PM -0400, Jim Ohlstein wrote:
>
>
>> Igor Sysoev wrote:
>>
>>> On Mon, Jul 13, 2009 at 03:33:21PM +0400, Maxim Dounin wrote:
>>>
>>>
>>>
>>>> Hello!
>>>>
>>>> On Fri, Jul 10, 2009 at 07:39:46PM -0400, Jim Ohlstein wrote:
>
by
Jim Ohlstein
-
Nginx Mailing List - English
Igor Sysoev wrote:
> On Mon, Jul 13, 2009 at 03:33:21PM +0400, Maxim Dounin wrote:
>
>
>> Hello!
>>
>> On Fri, Jul 10, 2009 at 07:39:46PM -0400, Jim Ohlstein wrote:
>>
>>
>>> I'm using the fastcgi cache for static files (images, javascript,css)
>>> and just found multiple lines in the error log like this one:
>>>
by
Jim Ohlstein
-
Nginx Mailing List - English
There's a post in the Spanish forum here on it. You may try contacting the author of that post about it directly.
by
Jim Ohlstein
-
How to...
I'm using the fastcgi cache for static files (images, javascript,css)
and just found multiple lines in the error log like this one:
2009/07/10 10:22:54 22476#0: ngx_slab_alloc() failed: no memory
in cache keys zone "one"
So I increased the memory available for the zone and reloaded nginx. It
took over five hours to go through the cache but these are the relevant
entries:
by
Jim Ohlstein
-
Nginx Mailing List - English
It should cache php pages. Do they have a "Cache-Control" header? There may be something in there that's preventing the cache from storing the page.
To test you could add
proxy_ignore_headers Cache-Control;
This only works on nginx 0.7.54 and later. I wouldn't recommend leaving that in a production environment but is a reasonable way to test.
by
Jim Ohlstein
-
How to...
I believe that the default path is /usr/local/nginx/logs but if you installed from a package it may be somewhere else.
If it is not there, run
# nginx -V
and look for a statement --error-log-path=
by
Jim Ohlstein
-
How to...
This should give you a start: http://wiki.nginx.org/NginxSymfony .
There are lots of references on Google if you search "symfony nginx".
by
Jim Ohlstein
-
How to...
If you mean to use it as a forward proxy like squid, then no, it's not possible. It's only a reverse proxy.
by
Jim Ohlstein
-
How to...
mattice Wrote:
-------------------------------------------------------
>or so it seems with my limited
> knowledge on the subject.
You probably know more than I.
You can add it as a separate request at http://wiki.nginx.org/NginxFeatureRequests but I wouldn't hold my breath waiting for it.
by
Jim Ohlstein
-
Migration from Other Servers
OK, I was wondering if it had been built without the autoindex module. That would have been an easy fix and something easy to have overlooked.
I wonder if it's a bug in an earlier version as I am running 0.8.4. I do suggest you upgrade at least to latest stable version (0.7.61).
As a test, I created a subdirectory "test" in the above location and added a section to the site config
by
Jim Ohlstein
-
How to...
I understand. I don't use a control panel for any of my personal servers either but my customers *need* them. :p
You answered your own question. Speed. I don't think nginx will ever support scanning for an .htaccess type of file for that very reason. If someone wanted to custom code it I suppose that they could but it would slow things down immensely and pretty much defeat the purpose.
by
Jim Ohlstein
-
Migration from Other Servers
Nginx does not support backend HTTP 1.1 connections at this time so you will need a workaround.
by
Jim Ohlstein
-
How to...
That's odd.
If you go to http://files.worldwartwozone.com/ you will see the autoindex module in use. This is the exact config:
server {
listen 76.73.78.220:80;
server_name files.worldwartwozone.com;
#server_name_in_redirect on;
index index.php index.html;
root /home/jim/files.worldwartwozone.com/files;
location / {
autoindex on;
autoindex_exact_size off;
}
}
Please post
by
Jim Ohlstein
-
How to...
I understand that. It's part of the fastcgi module. I believe that you need to have the cache statements in the same block as the fastcgi_pass (I could be wrong, I set this up a little while ago but Igor helped me with the configuration). It's why I asked. Feel free to not take my advice.
Here's a working configuration where I have a 6-8GB cache of image files:
location ~ (png|gif|jpg|jpeg
by
Jim Ohlstein
-
How to...
Try changing
location ^~ /svg/ {
autoindex on;
}
to
location /svg {
autoindex on;
}
by
Jim Ohlstein
-
How to...
Do you have a fastcgi_pass statement in that block?
If you are going to do this you should include some cookie checking conditionals so that users aren't able to see the admin's version of the pages. You might be better off with the WordPress super cache plugin.
by
Jim Ohlstein
-
How to...
It has to be done through reloading a configuration or re-setting file permissions accordingly.
It may be possible to have nginx proxy to another instance on nginx listening on a different port for each vhost (say UID +8000) . Then each user can have an "included" config file and trigger their own reloads. I've never tried it so it may not be possible as I know nginx likes to run as r
by
Jim Ohlstein
-
Migration from Other Servers
You're missing a leading forward slash:
rewrite ^/(.*/)?avatar/(.*) /wp-content/avatar.php?file=$2 last
Happy Fourth!
by
Jim Ohlstein
-
How to...
If you configure --with-http_stub_status_module.
You can install rrdtool and get graphs as in http://blog.kovyrin.net/2006/04/29/monitoring-nginx-with-rrdtool/ .
There are also Munin plugins for nginx.
by
Jim Ohlstein
-
Migration from Other Servers
Two things:
[*] Igor always suggests having no more workers than cores. You can increase the number of connections per worker (use a multiple of 1024 preferably) if you need to, but make certain that you have enough file descriptors available (most likely 2/connection).
[*] Your php-fpm.conf is attempting to use a feature which has never been implemented and that is the Apache style configur
by
Jim Ohlstein
-
Migration from Other Servers
I doubt that it's a security risk but I have never encountered this as an issue. What version of nginx are you running?
The default fastcgi_params file that is installed on a fresh nginx compile has
fastcgi_param SERVER_NAME $server_name;
So I wonder if Igor is aware of this...
by
Jim Ohlstein
-
Migration from Other Servers