Show all posts by user
Discussions in German
Something like:
# serve images
location ~* \.(jpe?g|gif|png)$ {
expires max; # or not if you prefer
}
# don't serve other types
location ~* \.(php|html?|js|css|xml)$ { # add other types as needed
return 404; # or whatever other error/redirect you prefer
}
by
Jim Ohlstein
-
How to...
On 2/17/10 10:16 AM, Benjamin Jackson wrote:
> Using nginx 0.6.31, the server is taking ~15 seconds between serving
> the next-to-last and the last image on the page. You can see this
> happening at http://wikimapa.org.br/multimidia.
This page and all of its images load very quickly for me on Firefox,
Opera, Safari (all on MacOSX) and on IE 8. I don't see any delay but I
am on a fiber
by
Jim Ohlstein
-
Nginx Mailing List - English
On 2/15/10 1:26 AM, CLIFFORD ILKAY wrote:
> On 02/15/2010 12:40 AM, Cliff Wells wrote:
>> Incidentally I'm not trying to lecture you, but I think this
>> conversation is worth having in this public forum as there are many
>> people who will read this at some future date, and without some
>> counter-argument, they might be led into thinking this is a good
>> solutio
by
Jim Ohlstein
-
Nginx Mailing List - English
On 2/14/10 12:05 AM, David Taveras wrote:
> Hello,
>
> Iam wondering if somebody could help me out in applying the GeoIP
> module country variable for china so that if it matches redirect the
> user to an error page?
Something like:
if ($geoip_country_code = CN) {
return 403; # or whatever you choose
}
Note the Geo module might well work better for you. See
http://forum.ng
by
Jim Ohlstein
-
Nginx Mailing List - English
I don't see anything striking in the nginx.conf that you posted. Those don't seem like high loads during peak hours on commodity hardware. Probably a dumb question, but are you running the PAE kernel? If so, and you only have 2GB of RAM, try booting with the standard kernel and see what happens. Have you tried using a TCP socket for PHP and seeing if it makes a difference? I don't think it will ne
by
Jim Ohlstein
-
Migration from Other Servers
That's the correct conversion. Perhaps it isn't being picked up as the URI is being matched in another location?
See http://wiki.nginx.org/NginxHttpCoreModule#location for more on which location directive matches first.
by
Jim Ohlstein
-
Migration from Other Servers
This *should* be a pretty simple one. Have you tried:
rewrite ^/dh_phpmyadmin/([^/]*)/?(.*) /dh/web/phpmyadmin/$2 last;
by
Jim Ohlstein
-
Migration from Other Servers
See http://forum.nginx.org/read.php?2,39564,39564#msg-39564
by
Jim Ohlstein
-
How to...
Your English is quite fine.
You could try something like:
location /path/to/images/ {
try_files $uri $uri/ @fallback;
}
location @fallback {
rewrite "^/path/to/images/([\d]{2})([\d]{2})(.*)$" /path/to/images/$1/$2/$1$2$3 last;
}
The "try_files" directive will look for the file in the uri requested, serve it if it's there, serve the index file of
by
Jim Ohlstein
-
How to...
Yes. See http://forum.nginx.org/read.php?2,47303,49324#msg-49324.
by
Jim Ohlstein
-
How to...
On 1/31/10 2:36 AM, adk1601@gmx.de wrote:
> Hello Nginx community,
>
> what is the best way protecting my nginx webserver against massiv request from single server/ips? I made some tests with openload and see one server with openload can fill the whole 100Mbit connection to my server.
>
http://wiki.nginx.org/NginxHttpLimitReqModule
http://wiki.nginx.org/NginxHttpLimitZoneModule
Thes
by
Jim Ohlstein
-
Nginx Mailing List - English
aliakbar Wrote:
-------------------------------------------------------
> Oh, I'm REALLY sorry for wasting your time it
> turns out my cached version of the page was set to
> serve it as a file it does return a 502 error
> (phew!) I was really worried.
That's what I figured. No worries.
I use Monit actually
> does supervisord have any performance benefits
> over it?
by
Jim Ohlstein
-
Migration from Other Servers
It seems that it was built without it then. If it were you would see something like:
# php -v
PHP 5.2.12 with Suhosin-Patch 0.9.7 (cli) (built: Jan 19 2010 15:54:10)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with XCache v1.3.0, Copyright (c) 2005-2009, by mOo
# php -i | grep enable-force-cgi-redirect
Configure Command =>
by
Jim Ohlstein
-
Migration from Other Servers
I don't *think* so. I don't see it in http://wiki.nginx.org/NginxHttpLogModule.
There is support for turning off access logging by location but I don't see it variables such as $remote_addr.
by
Jim Ohlstein
-
Migration from Other Servers
aliakbar Wrote:
-------------------------------------------------------
> php5-cgi crashes on occasion and nginx serves the
> files as plain text and forces the browser to
> download them.
>
> This is a huge security concern for me cause they
> can see the contents of my PHP files.
Use a process manager like php-fpm or supervisord which will restart php-cgi processes w
by
Jim Ohlstein
-
Migration from Other Servers
Is it possible that php was built without it?
What is the output of
# php -v
# php -i | grep enable-force-cgi-redirect
by
Jim Ohlstein
-
Migration from Other Servers
You can't configure mod_rewrite with fastcgi. That's an Apache module. There is a separate nginx module for rewrites and the syntax is similar but not exactly the same.
There are several threads on WordPress MU and super cache/rewrites here and and elsewhere. Use the search here first and if you don't find it you can search wider.
Recently I posted on this site a config for using supervisord
by
Jim Ohlstein
-
How to...
Using nginx on a Plesk server is going to be more problems than it's worth. If you're really serious about using ningx you need to reinstall the operating system and go without Plesk. You will use nginx to serve static files. For PHP you have several choices. I use fastcgi. Others use an Apache backend only for PHP listening on the loopback or elsewhere in their internal network. For fastcgi there
by
Jim Ohlstein
-
How to...
On 1/21/10 11:27 PM, Max wrote:
> Hello,
>
> I want to upgrade from 0.6. I just want to ask whether I should use ver
> 0.7 or 0.8? Is ver 0.8 stable enough? Thanks a lot.
"Stable enough" for what? Igor's development branch is more stable than
stable branches of many other projects. Many of the users on this list
use the development branch. That's where the new features are
by
Jim Ohlstein
-
Nginx Mailing List - English
I don't think "$geoip_country_by_name" takes an argument like that, but rather returns data based on the client's IP. At least it's not in the Wiki. See http://wiki.nginx.org/NginxHttpGeoIPModule. Even if it did it should never find one that since it's an internal IP. Further, you can only use that variable within nginx's configuration files, not within a PHP script.
Something like
by
Jim Ohlstein
-
How to...
Have you looked at http://labs.frickle.com/nginx_ngx_supervisord/. It may accomplish the task.
by
Jim Ohlstein
-
How to...
Depends what you consider a lot.
$ ps -auxw | grep supervisord | grep -v grep
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
root 80542 0.0 0.3 44820 13904 ?? Ss Fri04PM 1:37.12 /usr/local/bin/python2.6 /usr/local/bin/supervisord
(Column headers added for ease of reading.)
by
Jim Ohlstein
-
How to...
It's the same with php-fpm. There is no adaptive process management. It was planned, and may still be planned, but it's not yet available. It's up to you as the sysadmin to figure out the needs of the system and its users. If you want adaptive process management you need Apache but then you have much more overhead. If I understand suPHP correctly, you are running PHP as a cgi so each process is sp
by
Jim Ohlstein
-
How to...
floweringmind Wrote:
-------------------------------------------------------
> If you look here you can see that php-fpm is in
> the official php repo:
> http://php-fpm.org/download/
I am aware of that, but that hasn't been merged and that announcement is unofficial and says "might be" and "most likely" not "will be".
>
> But I am very inte
by
Jim Ohlstein
-
How to...
floweringmind Wrote:
-------------------------------------------------------
> Actually the whole route is kinda of pointless
> after reading some articles. It is much better to
> use php-fpm.
I agree. Suphp is slow.
>
> There is a decent article on doing this here:
> http://interfacelab.com/nginx-php-fpm-apc-awesome/
>
>
> By the time php 5.3.2 comes o
by
Jim Ohlstein
-
How to...
I haven't seen it done. What have you tried? Shouldn't it be a simple proxy_pass statement back to Apache? The rest is in the httpd.conf.
by
Jim Ohlstein
-
How to...
On 1/2/10 8:55 AM, Marcus Clyne wrote:
> Jim Ohlstein wrote:
>> On 1/1/10 7:59 AM, Marcus Clyne wrote:
>>> Hi,
>>>
>>> The forum (forum.nginx.org) appears to be having problems - at least I
>>> can't view more than the header 'Welcome to Nginx'. Is anyone else
>>> experiencing the same problems?
>>>
>>
>> The forum is back
by
Jim Ohlstein
-
Nginx Mailing List - English
On 1/1/10 7:59 AM, Marcus Clyne wrote:
> Hi,
>
> The forum (forum.nginx.org) appears to be having problems - at least I
> can't view more than the header 'Welcome to Nginx'. Is anyone else
> experiencing the same problems?
>
The forum is back up. Thanks for your patience.
--
Jim Ohlstein
_______________________________________________
nginx mailing list
nginx@nginx.org
http:/
by
Jim Ohlstein
-
Nginx Mailing List - English
We had some resource use issues here at the new server and I had to take the site offline. I finally got around to troubleshooting the problem and have fixed it. We should be "good to go" from this point forward.
by
Jim Ohlstein
-
Announcements