> Did you configured the nginx build with the > --with-debug option? > > See http://wiki.nginx.org/NginxDebugging Yes, this is what I was referring to earlier. Probably called it wrong, as "module". Mine is a production server. My reading suggests that "with-debug" the binary becomes quite large. Anyway, is there absolutely no other way? The "by pk899 - Nginx Mailing List - English
Thanks. I put this in my server directive: error_log logs/error.log debug; access_log logs/access.mine.log; log_format combined2 '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent"'; But this creates a file "access.mine.logby pk899 - Nginx Mailing List - English
It's not working. Keeps sending me back to "/site/index". Let me see if I can install nginx with the debug module and post back here. Or is it easier to install the echo module?by pk899 - Nginx Mailing List - English
António P. P. Almeida Wrote: > This won't work unless you have defined the name > of the script that is > to be executed by the upstream fastcgi process. > > What is the name of the script that receives the u > argument? get.php? index.php? Oh I see. I had totally misunderstood how this works. The name of the script is "/site/get". Without the .phby pk899 - Nginx Mailing List - English
Sorry edogawan. That was funny :) Appa, yes I agree, it is much clearer with the blocks now making sense. NOT working though. I will deal with Wordpress etc later. Want my root folder stuff to work first. Here are my simple rules. #---------------- location / { rewrite ^/([-~a-zA-Z0-9_\.]+)$ /site/get?u=$1; } location /site { locationby pk899 - Nginx Mailing List - English
Thanks so much appa. In your suggested example, is there an opening bracket after "location /site/.*\.(?:xml|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|doc|xls|exe|ppt)$" ? I got confused a bit with the blocks structure there. Will try some of this, and get back with results here especially related to the last "try_files" bit. I didn't fully comprehendby pk899 - Nginx Mailing List - English
ktm2 Wrote: ------------------------------------------------------- > On Wed, Jun 01, 2011 at 08:47:48AM -0400, pk899 > wrote: > > Hi. I notice that nginx with just the location > rules and usual > > directives results in mind-blowing performance. > Apache Bench test shows > > "115,000 requests per second" can be handled. > > > > Howeby pk899 - Nginx Mailing List - English
Hi. I notice that nginx with just the location rules and usual directives results in mind-blowing performance. Apache Bench test shows "115,000 requests per second" can be handled. However, when I add a simple rule: if ($request_method !~ ^(GET|HEAD|POST)$ ) { return 444; } Which I think is important from a point of view of getting rid of so much junk that hitsby pk899 - Nginx Mailing List - English
Loving Nginx so far! So much faster and leaner than Apache. Apologies for this yet another Rewrite rule help after so many threads, but one of domains has a special need and I am struggling with Rewrite rules. The logic is simple: 1. For anything in /site folder, it should treat the static files as it is, but all else is php (file names don't have .php extension). Still further in thisby pk899 - Nginx Mailing List - English
Hi. Probably a silly question, but I have noticed that if I have a properly tabbed/spaced config file, the performance of nginx goes down. Is this a valid observation? Thanks.by pk899 - Nginx Mailing List - English
I meant this: location / { Not "location = / {" of course. Thanks! ------------------------------------------------------- > I have a similar issue. > > Do we need separate location directives for each > and every possible path, or can we do some > "rewrite" inside location for the main / root > folder? For example: > >by pk899 - Nginx Mailing List - English
I have a similar issue. Do we need separate location directives for each and every possible path, or can we do some "rewrite" inside location for the main / root folder? For example: location = / { # rewrite rules come here.. rewrite "^/adm$" "/wordpress/wp-login.php"; .... fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME /var/www/exby pk899 - Nginx Mailing List - English
Hi. I am trying to replicate the functionality of mod_evasive on Apache, which basically says that at the same point the same IP can have only "X connections per second". I see the example here: http://wiki.nginx.org/HttpLimitZoneModule But this uses "binary_remote_addr". How does this cater for shared IPs, where people in the same network may actually have the same reby pk899 - Nginx Mailing List - English
I have setup nginx as a front proxy, it passes php requests to Apache. When I now try to access my site through, say, "TRACE", then naturally I see the 405 error. But this is a nginx default message. How can I make sure that I see my own customized error page? I have this in my "Server" definition... #================================ # Custom error page... #==by pk899 - Nginx Mailing List - English
thanks igor and maxim. the proxy stuff is not working for me but i am so liking the nginx server that i will follow your advice to not care about mod security so much and just do application level checking in php. my question: is there a simple guide to get php working on nginx when it is already installed and running with apache as mod_php on the server? while testing nginx i dont want to breby pk899 - Nginx Mailing List - English
Thomas Love Wrote: ------------------------------------------------------- > > 1. how should i block remote_addr based on IP in > a certain external > > file? > > > > It's in your link: include /etc/nginx/block.conf; Not correct. The "block.conf" as that guy mentions is only a collection of rules. I am asking if I can have a file that is fuby pk899 - Nginx Mailing List - English
Because this forum does not allow editing, here's my edit: Thanks. So with this setup, this works: http://mydomain.com:81/static/test.gif But when I try this: http://mydomain.com:81/ (main site) It **physically** redirects to http://mydomain.com. How can I avoid this?by pk899 - Nginx Mailing List - English
Thanks. So with this setup, this works: http://mydomain.com:81/static/test.gif But when I try this: http://mydomain.com:81/static/test.gif It physically redirects to http://mydomain.com. How can I avoid this?by pk899 - Nginx Mailing List - English
Thanks. But I am a bit confused, as the simple setup is not working from port 81 (for testing): server { listen 81; server_name MYDOMAIN.com www.MYDOMAIN.com; location ^~ /site/static { root /home/MYDOMAIN/www/static; index index.htm index.php; expires 30d; gzip on; } location / { proxy_pass http://127.by pk899 - Nginx Mailing List - English
Thanks. The RBL checking in Apache (via mod security) can happen in very specific manner. I could specify that they check only specific arguments (the very precise "input" field in the html) in a very specific page ("postcommentform.php"). Similarly, sure, the application needs to be smartly coded to prevent against injections. But mod_security enables blocking this at a muby pk899 - Nginx Mailing List - English
Some problems with your recommendation, Igor. 1. There is no directive like "gzip_static". 2. The proxy_pass that you recommend above -- this does a full 301 redirect to Apache! This is really not the solution I am after. So, back to my first question, how do I pass the baton from Apache (which really needs to be my first front server because of all the features) only forby pk899 - Nginx Mailing List - English
thanks. i have reading about nginx a lot on the internet. and it seems to me that many features of mod_security are available inside nginx. i like this post: http://eng.eelcowesemann.nl/linux-unix/nginx/nginx-blocking/ my questions. 1. how should i block remote_addr based on IP in a certain external file? 2. to block xss or such type of injection attacks -- any best practice rules? 3.by pk899 - Nginx Mailing List - English
thanks for this. but before I try all this on a production server, couple questions: 1. if this works with NGINX on port 81, can this work in the future on port 80? So will nginx and apache both be on port 80? I doubt it but want to confirm. 2. secondly, do you have a production-ready sample of how to set up for static serving? in apache for example, we set max-age, expires, gzip, cache-coby pk899 - Nginx Mailing List - English
thanks igor. wow, so fast reply. how can i setup nginx "before apache"? will i have to change apache port? and what will the syntax look like. is there any simple guide? i have a high traffic site so dont want to break the functionality. thanks!by pk899 - Nginx Mailing List - English
Hi sorry for english. i am on centos 64 bit server with cpanel and whm. i have apache 2.2.18 and there is heavy duty use of the following: 1. mod rewrite 2. mod geoip 3. mod security (with rules available in 2.6.0 for google safe browsing checks etc) 4. mod evasive 5. php5 functionality with memcached + eaccelerator for #1, i see from threads on this phorum that some reby pk899 - Nginx Mailing List - English