Quantcast
Channel: Nginx Forum - How to...
Browsing all 4759 articles
Browse latest View live
↧

How can I work with several sub-domains in NGINX?

I understand to a certain degree how the regex expressions work for nginx and server_name, but there's one regex that I just cannot get my head around.I want to have several sub-domains in the form...

View Article


Re: How to setup up Nginx to use Nagios monitoring?

It depends on what nagios wants but this module can deliver alot of realtime statistics: https://github.com/vozlt/nginx-module-vts

View Article


Nginx reverse proxy strip issue

Hello All,I just set up Nginx reverse proxy to serve my mobile client app , all is working well exeptone issue which isthe proxy tried to optimize the url by removing what it thinks is unnecessary.....

View Article

Re: Nginx reverse proxy strip issue

Try,proxy_pass http://192.168.2.100:8080;

View Article

Location try_files and friendly URLs

Hi, I hope someone answer my question.For you guys this can be very simple but I'm a NginX beginner.I do have a website, which is not Worpdress, installed NginX and PHP FastCGIEverything is ok, but I...

View Article


Re: Nginx reverse proxy strip issue

itpp2012 Wrote:-------------------------------------------------------> Try,>> proxy_pass http://192.168.2.100:8080;Thanks its Works :-)

View Article

Re: what is the PM.MAX_CHILDREN?

Hi Ramesh, since this forum seems to be abandoned...If you are a chinese the max children must be one.

View Article

how to block a particular URL in nginx

Hi,I have a nginx conf file in which i want to block this particular url example-xyz.com.I have added the following lines in my conf file.server {port_in_redirect off;server_tokens off;if...

View Article


Re: how to block a particular URL in nginx

A little modification.server {port_in_redirect off;server_tokens off;if ($http_host$request_uri = 'example-xyz.com') {return 403;break;}listen 80;}

View Article


Re: how to block a particular URL in nginx

Get the latest version here http://nginx-win.ecsds.eu/Then look in the /conf/ folder at nginx-simple-WAF.confon how to do this with map and using wildcards (regx).

View Article

Issue with multiple location

Hello guys,I have a problem I want to fix. My server configuration is attached to this post.I have a server block with includes my main website powered by the Kohana framework.I have also a Wordpress...

View Article

Re: Issue with multiple location

I found an easy option: I duplicated the location block into my Kohana and into my blog locations.It seems to workThanks

View Article

conditionally disable keepalive for specific client IP address

Hello,We're using nginx as a reverse proxy and we need to disable client keepalive for some specific client IP address.I know that it can be done like this with apache:SetEnvIf Remote_Addr...

View Article


Re: conditionally disable keepalive for specific client IP address

Something like;map $remote_addr $kealtime {default 30;~^(192.168.123.*)$ 60;~^(192.122.222.*)$ 0;}[...]keepalive_timeout $kealtime;

View Article

Set NGINX as localhost proxy and set headers

Hello,I need something (I think) simple.For some tests I execute want to use NGNIX as proxy on localhost , and to set some headers for each HTTP request.Looks like adding headers is pretty easy - I...

View Article


Re: Set NGINX as localhost proxy and set headers

> But is it possible to use NGINX as a proxy server on localhost (on> windows).nginx can't do proxy like you want, for this you will need to use squid.

View Article

Re: Set NGINX as localhost proxy and set headers

itpp2012 Wrote:-------------------------------------------------------> > But is it possible to use NGINX as a proxy server on localhost (on> > windows).>> nginx can't do proxy like...

View Article


Re: conditionally disable keepalive for specific client IP address

I tried this but it seems to be forbiden:nginx: [emerg] "keepalive_timeout" directive is not allowed here in...It seems that we can't set keepalive_timeout with variable of within a if block:...

View Article

Re: conditionally disable keepalive for specific client IP address

Maybe Lua can do this,set_by_lua $notused 'ngx.var.keepalive_timeout = ngx.var.kealtime;';https://github.com/chaoslawful/lua-nginx-module

View Article

Re: conditionally disable keepalive for specific client IP address

This seems to work;location / {set $keepalive_timeout '';root html;[...]set_by_lua $notused 'ngx.var.keepalive_timeout = ngx.var.kealtime;';}

View Article
Browsing all 4759 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>