Hello,
I have a fresh new installation of nginx on ubuntu 8.04 (installed via
apt-get, I believe it is 0.5.x something)
In my nginx.conf file I have gzip turned on, now I wanted to do a basic test
and serving a static html file, but the file does not come compressed at
all.
Here's the snippet of configuration, I tried variations on this without
success
gzip on;
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_proxied any;
gzip_types text/plain text/html text/css application/x-javascript
text/xml application/xml application/xml+rss text/javascript;
gzip_http_version 1.1;
gzip_comp_level 6;
Does anyone have any idea why nothing is compressed?
I've used this http://www.gidnetwork.com/tools/gzip-test.php and others to
test the results.
Thank you so much!
Can anyone recommend a good log analysis tool that is a good match for nginx? I'd like something that is flexible, where I can tell it which fields in the format are for which parts of the data (i.e. user agent is field 6) etc. Thanks! Note that I am looking for a SERVER SIDE tool to process the nginx logs (JavaScript based analytics tools will not work for this particular application).
Hello,
I have some problems running (perl) cgi scripts with nginx.
I followed the config at http://wiki.codemongers.com/NginxSimpleCGI
Perl scripts work very well as long as they use method=get in forms. If
they use method=post, it seems no input is passed to the cgi.
I saw in perl-fcgi.pl that there was some lines: "if
(($req_params{'REQUEST_METHOD'} eq 'POST') && ($req_len != 0) ){ "
Which should pass the info
Has someone an idea of what's happening?
Regards
Hi All
I'm trying to move a bunch of rails apps from an apache/fastcgi
platform to nginx/mongrel_cluster.
What I want is something like this;
http://my.server/app1 --> mongrel_cluster1
http://my.server/app2 --> mongrel_cluster2
I can do this in nginx with something like this;
...
upstream mongrel_cluster1 {
server 127.0.0.1:3001;
server 127.0.0.1:3002;
}
upstream mongrel_cluster2 {
server 127.0.0.1:4001;
server 127.0.0.1:4002;
}
server {
...
location /app1 {
proxy_pass http://mongrel_cluster1;
break;
}
location /app2 {
proxy_pass http://mongrel_cluster2;
break;
}
...
But, the problem is that I'm now hitting my rails apps with paths like
this;
/app1/controller/method
/app2/controller/method
...when the apps want the paths to be just /controller/method
So, I want to use something like this to remove the 'app1' part;
rewrite ^/app1/(.*)$ /$1 permanent;
But, that seems to override the proxy_pass directive, because if I put
that in my location blocks, I just get 404 errors, and it's not
allowed in my upstream blocks.
I know I could use virtual hosts, with a different subdomain for each
app, but that would be this;
http://app1.my.server --> mongrel_cluster1
http://app2.my.server --> mongrel_cluster2
...which is not what I want.
Is there any way to achieve what I want, using nginx?
Thanks in advance for any help.
David
Hi All!
I'm new on this nice discussion list but I'm a long time lurker.
I'm working on a very specific module for Nginx: a complete CMS. It may
sounds strange since upstream servers and scripting languages are the
norm for the CMS, but I want (and need) speed.
So far I've done many things without too much trouble, but I'm a little
bit stuck with the processing of events in Nginx. I would like to
process a specific event which is not connection related but created by
one of my worker threads.
I hope this short example will be clear:
// My specific Nginx http handler
int my_http_handler (ngx_request_t * r)
{
if (r->my_state == 0) // first step: initiate the work to do
{
r->my_state ++ ;
my_sendmsg (myqueue,r) ; // send a message to worker
return NGX_AGAIN ; // please call me back when done
}
else // second step: results are ready
{
// produce xhtml output from results
return NGX_OK ; // finished
}
}
// The worker running on a specific thread
void my_http_worker (void * arg)
{
ngx_http_request_t * r ;
ngx_event_t * ev ;
while (1)
{
my_recvmsg (myqueue,r) ;
// processing the request
// ...
// wake up my_http_handler
ngx_post_event (ev, (ngx_event_t * *) & ngx_posted_events) ;
}
}
But I don't know how to fill the ngx_event_t (in particular the
handlers) in order to call again my_http_handler on Nginx's context.
I believe it's possible to do so from what I've seen, but Nginx's code
is not so easy to enter on (it's not a critic).
Sorry for this (first) long message but I think it would be nice to be
able to develop clean and non blocking modules for Nginx.
BTW forgive my English, I'm French ;-)
Hi list,
I am currently using Nginx' flv module for streaming some video,
however I have one slight little problem, is that the file can still
be easily downloaded. Is there a way I can protect against that? Is it
an Nginx issue or something to do with the response headers not being
properly set in my application?
Hi there,
is it planned to add digest auth at some time ? It's not that basic
auth is not useful, but it's pretty weak on replay attacks. Nowadays,
every common browser supports digest auth so it would be really a
plus.
I'm also interested if it could support internal urls for the internal
password file, like X-Accel-Redirect does. It would be really useful
to delegate authentication to a third-party web application in a
multi-application setup.
--
Cheers,
zimbatm
Hi,
Using Nginx + X-Accel_Redirect + Regular Quicktime movies works, but
the user needs to wait for the film to be fully downloaded to watch
it.
Therefore I decided to prepare my movies with the Fast-Start option,
but the movies load barely a few bytes and take ages to play.
Do I need to adjust the content headers or do I need to move to flash
for streaming and using x-accel-redirect?
hi
I would like to know if it's possible to configure Nginx as
Perdition with ldap. Because i have one Webmail IMP/HORDE and two
store with mailbox. I
want to be able to choose a back-end server based on the user's
identity on the LDAP
For example with perdition in configuration file Perdition.conf
M /usr/lib/libperditiondb_ldap.so
m "ldap://ldap.domain.fr:389/o=domain,c=fr?uid,mailHost,port?sub?(uid=%s)"
The same with Nginx is it possible??Or an other solution
Thanks in advance
As the title says I try to setup a facebook app, with rails (mongrel) as
app.server, nginx as reverse proxy and memcached as the place to store
the rails pagecache stuff. So far I could not figure out a working nginx
config.
I tried it with this article:
http://brainspl.at/articles/2007/11/26/serving-rails-page-caches-to-a-faceb…
and hacked a bit by myself but nothing really worked. Would be great if
anybody would have a working configuration.
Regards,
Sascha
--
Posted via http://www.ruby-forum.com/.