António P. P. Almeida | 1 Mar 2011 01:03
Favicon
Gravatar

Re: Time-of-day caching?

On 28 Fev 2011 19h53 WET, nginx-forum@... wrote:

> Quick note of intro: I'm certainly not a highly-experienced sys
> admin or developer -- more of a "gifted amateur" as a friend once
> called me :) Anyway:
>
> I have a large and fairly complex WordPress-based site that's become
> a lot more popular than expected, and is often close to maxing out
> my hardware. My challenge in optimizing the site is that all of the
> most popular pages/files are very time-sensitive -- they're updated
> at specific times of day, and are very heavily downloaded as soon as
> they're available. So: I need those pages/files to be flushed from
> the cache the moment they change, while everything else is cached
> more aggressively.

I'm not much of a WP guy, mostly Drupal ;), but I think that this WP
plugin can be of assistance in your quest:

http://wordpress.org/extend/plugins/nginx-proxy-cache-purge/

You need to install the cache purge 3rd party module:

https://github.com/FRiCKLE/ngx_cache_purge/

Note that this is a route that voids solutions like SuperCache. It's
more complex to setup, but ultimately much more flexible. 

> I haven't found a good solution for this with WordPress plug-ins
> such as SuperCache -- they seem to be too "all-or-nothing", flushing
> too much or too little.
(Continue reading)

d5chris | 1 Mar 2011 03:25
Picon

Scalability - using nginx with up to 300k comet connections

Hi all,

I saw on the nginx faq that "10,000 inactive HTTP keep-alive connections
take about 2.5M memory"
Sounds incredibly good! I was wondering if nginx would scale to 300k
comet connections on a single server. From the faq entry, it sounds like
that would require 75 megs of memory, which sounds like it'd be barely
raising a sweat.
Our application involves holding open comet connections to about 300k
clients, at very low per-connection messaging rates, using NHPM
(pushmodule.slact.net) or whatever is the best way to use nginx with
comet.

Would nginx be ideal for this?
Thanks so much

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,179335,179335#msg-179335

_______________________________________________
nginx mailing list
nginx@...
http://nginx.org/mailman/listinfo/nginx

speedfirst | 1 Mar 2011 03:44
Picon

Re: Implementation of parsing URL to IPv6

never try to use a mail list before. I try to send the diff to
nginx-devel@... through email. Is that OK? sorry this is naive.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,179085,179339#msg-179339

_______________________________________________
nginx mailing list
nginx@...
http://nginx.org/mailman/listinfo/nginx

speedfirst | 1 Mar 2011 03:57
Picon

Re: Implementation of parsing URL to IPv6

what I mean is, in Web, nginx-devel <at>  is readonly. And after I send mail,
my message doesn't show in the list. Is it alright?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,179085,179342#msg-179342

_______________________________________________
nginx mailing list
nginx@...
http://nginx.org/mailman/listinfo/nginx

Aditya Herlambang | 1 Mar 2011 06:08
Picon
Favicon
Gravatar

problem with virtual host settings




So I have a info.php page which is located on the folder /var/www/nginx-default, however when I go to my ip address/info.php, it always redirects me to this site:

http://www.iana.org/domains/example/

is this because I have a virtual host that I called example? Here is my config for the example website:


server { listen 80; server_name www.example.com; rewrite ^/(.*) http://example.com/$1 permanent; } server { listen 80; server_name example.com; access_log /var/www/example.com/logs/access.log; error_log /var/www/example.com/logs/error.log; location / { root /var/www/example.com/public/; index index.html; } }


As I don't have a domain name yet and I can only access the server via terminal. The way I access this site via browser is by changing my /etc/hosts in my macbook so that example.com is mapped to my server IP address. however now when I do xxx.xxx.xxx.xxx/info.php in my macbook browser it redirects me to that site I posted above, when I access example.com from my macbook it works just fine.

_______________________________________________
nginx mailing list
nginx@...
http://nginx.org/mailman/listinfo/nginx
Igor Sysoev | 1 Mar 2011 07:00
Picon
Favicon

Re: Implementation of parsing URL to IPv6

On Mon, Feb 28, 2011 at 09:57:21PM -0500, speedfirst wrote:
> what I mean is, in Web, nginx-devel <at>  is readonly. And after I send mail,
> my message doesn't show in the list. Is it alright?

To write in the list you have to subscribe to.
Now I have added your two addresses in the write only mode.

--

-- 
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@...
http://nginx.org/mailman/listinfo/nginx

Igor Sysoev | 1 Mar 2011 07:03
Picon
Favicon

Re: Implementation of parsing URL to IPv6

On Mon, Feb 28, 2011 at 09:44:24PM -0500, speedfirst wrote:
> never try to use a mail list before. I try to send the diff to
> nginx-devel@... through email. Is that OK? sorry this is naive.

Please send the patch in "diff -u" format.
The default diff format is intended for aliens.

--

-- 
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@...
http://nginx.org/mailman/listinfo/nginx

speedfirst | 1 Mar 2011 08:28
Picon

Why NGX_SOCKADDRLEN is 512?

For an IPv6, sizeof (struct sockaddr_in6) is only 28bytes, so why set
NGX_SOCKADDRLEN 512?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,179363,179363#msg-179363

_______________________________________________
nginx mailing list
nginx@...
http://nginx.org/mailman/listinfo/nginx

andiL | 1 Mar 2011 08:34
Picon

Catch ALL requests by LUA-script

Hi,

i'm using the nginx-lua-module by agentzh on the current stable nginx
(0.8.54) (also the drizzle and echo module and php via php-fpm)

it's working fine with a plain nginx running

What i would like to to:
Is it possible to create a location-entry in the nginx.conf that ALL
requests coming to the Server are handled by a LUA-script?

i.e. i have set the *.php and / locations to internal so only the lua
script should have access to the files (it's responsible for the in- and
output)

i created another "location * { }" ... which contains
"rewrite_by_lua_file /path/to/the/script" and for testing purposes
"default_type 'text/html'"

But now, every request to the Server ends with a 404.

Background: I would like to have a LUA-script which handles every
request and filters certain Headers, Parameters, etc.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,179364,179364#msg-179364

_______________________________________________
nginx mailing list
nginx@...
http://nginx.org/mailman/listinfo/nginx

Antoine BONAVITA | 1 Mar 2011 08:53
Picon
Favicon

Re: problem with virtual host settings

Hello,

Short answers:
- Add www.example.com to your /etc/hosts
OR
- In your second server block, change "listen 80" to "listen 80 default;".

Both should work.

Now, to understand why : have a look there http://nginx.org/en/docs/http/request_processing.html

A.

From: Aditya Herlambang <aditya15417-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org>
To: nginx-jCiJ2l+ov5bYtjvyW6yDsg@public.gmane.org
Sent: Tue, March 1, 2011 6:08:53 AM
Subject: problem with virtual host settings




So I have a info.php page which is located on the folder /var/www/nginx-default, however when I go to my ip address/info.php, it always redirects me to this site:

http://www.iana.org/domains/example/

is this because I have a virtual host that I called example? Here is my config for the example website:


server {
listen 80;
server_name www.example.com;
rewrite ^/(.*) http://example.com/$1 permanent;
}

server {
listen 80;
server_name example.com;

access_log /var/www/example.com/logs/access.log;
error_log /var/www/example.com/logs/error.log;

location / {
root /var/www/example.com/public/;
index index.html;
}
}


As I don't have a domain name yet a nd I can only access the server via terminal. The way I access this site via browser is by changing my /etc/hosts in my macbook so that example.com is mapped to my server IP address. however now when I do xxx.xxx.xxx.xxx/info.php in my macbook browser it redirects me to that site I posted above, when I access example.com from my macbook it works just fine.


_______________________________________________
nginx mailing list
nginx@...
http://nginx.org/mailman/listinfo/nginx

Gmane