Rate limit per day

2016-10-03 Thread nitin bhadauria
Hello Team,

Is it possible to use Module ngx_http_limit_req_module to rate limit
request / day ?

Regards,
Nitin B.
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

specific to index.php rest of them index.html

2016-10-03 Thread Tseveendorj Ochirlantuu
Hello,

I need to configure some locations go to index.php rest go to index.html


if ($request_uri !~ ^/(location1|location2|location3)$ ) {
  rewrite ^(.*) /index.html;
}

but how to else ?

if the request contains location1, location2, location3 goes to
fastcgi_pass 127.0.0.1:9000;
if not contain go to /index.html

regards,
tseveen
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: specific to index.php rest of them index.html

2016-10-03 Thread Richard Stanway
Why not use the location directive? This is what it is designed for.

http://nginx.org/en/docs/http/ngx_http_core_module.html#location


On Mon, Oct 3, 2016 at 12:28 PM, Tseveendorj Ochirlantuu <
tseveend...@gmail.com> wrote:

> Hello,
>
> I need to configure some locations go to index.php rest go to index.html
>
>
> if ($request_uri !~ ^/(location1|location2|location3)$ ) {
>   rewrite ^(.*) /index.html;
> }
>
> but how to else ?
>
> if the request contains location1, location2, location3 goes to
> fastcgi_pass 127.0.0.1:9000;
> if not contain go to /index.html
>
> regards,
> tseveen
>
> ___
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: specific to index.php rest of them index.html

2016-10-03 Thread Tseveendorj Ochirlantuu
This is for symfony2 project.

location ~ /location1 {
  fastcgi things;
}

location ~ /location2 {
  fastcgi things;
}

location ~ /location3 {
  fastcgi things;
}


location / {
  index index.html;
}

Above examples how fit to symfony2 below. Mine is


# dev
location ~ ^(app_dev|config)\.php$ {
  fastcgi things;
}

# prod
location ~ ^app.php {
  fastcgi things;
}

location ~ \.php {
 deny all;
}

location / {
  try_files;
}

On Mon, Oct 3, 2016 at 8:40 PM, Richard Stanway 
wrote:

> Why not use the location directive? This is what it is designed for.
>
> http://nginx.org/en/docs/http/ngx_http_core_module.html#location
>
>
> On Mon, Oct 3, 2016 at 12:28 PM, Tseveendorj Ochirlantuu <
> tseveend...@gmail.com> wrote:
>
>> Hello,
>>
>> I need to configure some locations go to index.php rest go to index.html
>>
>>
>> if ($request_uri !~ ^/(location1|location2|location3)$ ) {
>>   rewrite ^(.*) /index.html;
>> }
>>
>> but how to else ?
>>
>> if the request contains location1, location2, location3 goes to
>> fastcgi_pass 127.0.0.1:9000;
>> if not contain go to /index.html
>>
>> regards,
>> tseveen
>>
>> ___
>> nginx mailing list
>> nginx@nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx
>>
>
>
> ___
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

URL is not pointing to https on iframe

2016-10-03 Thread Geo P.C.
In our site we are loading a calnedar api function that works on http (
cdn.instantcal.com) . While loading this site on our wordpress site with
https its not working and getting an error:

"Mixed Content: The page at '
https://www.geo.com/wp-admin/post.php?post=362&action=edit' was loaded over
HTTPS, but requested an insecure resource '
http://cdn.instantcal.com/cvj.html'. This request has been blocked; the
content must be served over HTTPS."

In order to fix the Mixed Iframe Issue in our Nginx Proxy server we
configured a new site on https calendar.geopc.com and that proxies to
cdn.instantcal.com.

server {
  listen 443;
  server_name calendar.geopc.com;
location / {
proxy_pass  http://cdn.instantcal.com;
proxy_set_header Host  cdn.instantcal.com;
   proxy_set_header X-Real-IP $remote_addr;
}
}

Then In Iframe we given the url as

But in Iframe we are getting the same error

Mixed Content: The page at '
https://www.geo.com/wp-admin/post.php?post=362&action=edit' was loaded over
HTTPS, but requested an insecure resource '
http://calendar.geopc.com/cvj.html?idcloseable=0&gnavigable=1&gperiod=da'.
This request has been blocked; the content must be served over HTTPS.

When we directly access the url calendar.geopc.com on https its working
fine on https. But please let me know whats the issue? Is it on Iframe or
on Nginx. Can anyone please help us?
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: URL is not pointing to https on iframe

2016-10-03 Thread Yuriy Medvedev
Hi, please use $scheme
proxy_set_header X-Forwarded-Proto $scheme;

2016-10-03 16:58 GMT+03:00 Geo P.C. :

> In our site we are loading a calnedar api function that works on http (
> cdn.instantcal.com) . While loading this site on our wordpress site with
> https its not working and getting an error:
>
> "Mixed Content: The page at 'https://www.geo.com/wp-admin/
> post.php?post=362&action=edit' was loaded over HTTPS, but requested an
> insecure resource 'http://cdn.instantcal.com/cvj.html'. This request has
> been blocked; the content must be served over HTTPS."
>
> In order to fix the Mixed Iframe Issue in our Nginx Proxy server we
> configured a new site on https calendar.geopc.com and that proxies to
> cdn.instantcal.com.
>
> server {
>   listen 443;
>   server_name calendar.geopc.com;
> location / {
> proxy_pass  http://cdn.instantcal.com;
> proxy_set_header Host  cdn.instantcal.com;
>proxy_set_header X-Real-IP $remote_addr;
> }
> }
>
> Then In Iframe we given the url as
>
> But in Iframe we are getting the same error
>
> Mixed Content: The page at 'https://www.geo.com/wp-admin/
> post.php?post=362&action=edit' was loaded over HTTPS, but requested an
> insecure resource 'http://calendar.geopc.com/cvj.html?idcloseable=0&;
> gnavigable=1&gperiod=da'. This request has been blocked; the content must
> be served over HTTPS.
>
> When we directly access the url calendar.geopc.com on https its working
> fine on https. But please let me know whats the issue? Is it on Iframe or
> on Nginx. Can anyone please help us?
>
> ___
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

nginx worker process exited on signal 7

2016-10-03 Thread smaig
Hello team,

i've followed this
tutorial(https://www.c-rieger.de/nextcloud-installation-guide/) to configure
nginx for nextcloud on a raspberry pi 3 but using Raspbian OS instead of
Ubuntu.

I guess the only specific thing in this installation is that we used
"ngx_cache_purge-2.3" args to compile nginx 1.11.4:

...
COMMON_CONFIGURE_ARGS := \
...
 --with-ld-opt="$(LDFLAGS)" \
 --add-module="$(CURDIR)/debian/modules/ngx_cache_purge-2.3" 

In one case, everything is working using those configuration files :

nginx.conf : http://pastebin.com/KnpAFm3h 
nextcloud.conf.https : http://pastebin.com/ZzDy9puJ

nginx/error.log (debug level):

2016/10/01 11:12:15 [notice] 14944#14944: built by gcc 4.9.2 (Raspbian
4.9.2-10) 
2016/10/01 11:12:15 [notice] 14944#14944: OS: Linux 4.4.21-v7+
2016/10/01 11:12:15 [notice] 14944#14944: getrlimit(RLIMIT_NOFILE):
1024:4096
2016/10/01 11:12:15 [notice] 14945#14945: start worker processes
2016/10/01 11:12:15 [notice] 14945#14945: start worker process 14946
2016/10/01 11:12:15 [notice] 14945#14945: start worker process 14947
2016/10/01 11:12:15 [notice] 14945#14945: start worker process 14948
2016/10/01 11:12:15 [notice] 14945#14945: start worker process 14949
2016/10/01 11:12:15 [notice] 14945#14945: start cache manager process 14950
2016/10/01 11:12:15 [notice] 14945#14945: start cache loader process 14951
2016/10/01 11:12:28 [notice] 14949#14949: *1 "^" matches "/", client:
1.2.3.4, server: mycloud.dyndns.org, request: "GET / HTTP/1.1", host:
"mycloud.dyndns.org"
2016/10/01 11:12:28 [notice] 14949#14949: *1 rewritten data: "/index.php/",
args: "", client: 1.2.3.4, server: mycloud.dyndns.org, request: "GET /
HTTP/1.1", host: "mycloud.dyndns.org"
2016/10/01 11:12:28 [notice] 14949#14949: *1 "^" matches "/apps/files/",
client: 1.2.3.4, server: mycloud.dyndns.org, request: "GET /apps/files/
HTTP/1.1", host: "mycloud.dyndns.org"
2016/10/01 11:12:28 [notice] 14949#14949: *1 rewritten data:
"/index.php/apps/files/", args: "", client: 1.2.3.4, server:
mycloud.dyndns.org, request: "GET /apps/files/ HTTP/1.1", host:
"mycloud.dyndns.org"
2016/10/01 11:12:31 [notice] 14947#14947: *12 "^" matches
"/apps/encryption/ajax/getStatus", client: 1.2.3.4, server:
mycloud.dyndns.org, request: "GET /apps/encryption/ajax/getStatus HTTP/1.1",
host: "mycloud.dyndns.org"
2016/10/01 11:12:31 [notice] 14947#14947: *12 rewritten data:
"/index.php/apps/encryption/ajax/getStatus", args: "", client: 1.2.3.4,
server: mycloud.dyndns.org, request: "GET /apps/encryption/ajax/getStatus
HTTP/1.1", host: "mycloud.dyndns.org"


In another one, it's not working with those configuration files :

nginx.conf : http://pastebin.com/Yyuk7ki2
gateway.conf : http://pastebin.com/P4Kzdt41
nextcloud.conf : http://pastebin.com/6ySjAHGB

nginx/error.log:

2016/10/01 11:13:38 [notice] 14975#14975: built by gcc 4.9.2 (Raspbian
4.9.2-10) 
2016/10/01 11:13:38 [notice] 14975#14975: OS: Linux 4.4.21-v7+
2016/10/01 11:13:38 [notice] 14975#14975: getrlimit(RLIMIT_NOFILE):
1024:4096
2016/10/01 11:13:38 [notice] 14976#14976: start worker processes
2016/10/01 11:13:38 [notice] 14976#14976: start worker process 14977
2016/10/01 11:13:38 [notice] 14976#14976: start worker process 14978
2016/10/01 11:13:38 [notice] 14976#14976: start worker process 14979
2016/10/01 11:13:38 [notice] 14976#14976: start worker process 14980
2016/10/01 11:13:38 [notice] 14976#14976: start cache manager process 14981
2016/10/01 11:13:38 [notice] 14976#14976: start cache loader process 14982
2016/10/01 11:13:48 [notice] 14977#14977: *1 "^" matches "/", client:
1.2.3.4, server: mycloud.dyndns.org, request: "GET / HTTP/1.1", host:
"mycloud.dyndns.org"
2016/10/01 11:13:48 [notice] 14977#14977: *1 rewritten data: "/nextcloud",
args: "", client: 1.2.3.4, server: mycloud.dyndns.org, request: "GET /
HTTP/1.1", host: "mycloud.dyndns.org"
2016/10/01 11:13:48 [notice] 14978#14978: *5 "^" matches "/nextcloud",
client: 127.0.0.1, server: 127.0.0.1, request: "GET /nextcloud HTTP/1.1",
host: "mycloud.dyndns.org"
2016/10/01 11:13:48 [notice] 14978#14978: *5 rewritten data:
"/nextcloud/index.php/nextcloud", args: "", client: 127.0.0.1, server:
127.0.0.1, request: "GET /nextcloud HTTP/1.1", host: "mycloud.dyndns.org"
2016/10/01 11:13:48 [info] 14978#14978: *5 client 127.0.0.1 closed keepalive
connection
2016/10/01 11:13:48 [notice] 14976#14976: signal 17 (SIGCHLD) received
2016/10/01 11:13:48 [alert] 14976#14976: worker process 14977 exited on
signal 7
2016/10/01 11:13:48 [notice] 14976#14976: start worker process 14984
2016/10/01 11:13:48 [notice] 14976#14976: signal 29 (SIGIO) received
2016/10/01 11:13:48 [notice] 14980#14980: *7 "^" matches "/", client:
1.2.3.4, server: mycloud.dyndns.org, request: "GET / HTTP/1.1", host:
"mycloud.dyndns.org"
2016/10/01 11:13:48 [notice] 14980#14980: *7 rewritten data: "/nextcloud",
args: "", client: 1.2.3.4, server: mycloud.dyndns.org, request: "GET /
HTTP/1.1", host: "mycloud.dyndns.org"
2016/10/01 11:13:48 [notice] 14978#14978: *11 "^" matches "/

Re: nginx worker process exited on signal 7

2016-10-03 Thread Maxim Dounin
Hello!

On Mon, Oct 03, 2016 at 11:04:39AM -0400, smaig wrote:

> i've followed this
> tutorial(https://www.c-rieger.de/nextcloud-installation-guide/) to configure
> nginx for nextcloud on a raspberry pi 3 but using Raspbian OS instead of
> Ubuntu.
> 
> I guess the only specific thing in this installation is that we used
> "ngx_cache_purge-2.3" args to compile nginx 1.11.4:
> 
> ...
> COMMON_CONFIGURE_ARGS := \
> ...
>  --with-ld-opt="$(LDFLAGS)" \
>  --add-module="$(CURDIR)/debian/modules/ngx_cache_purge-2.3" 
> 
> In one case, everything is working using those configuration files :
> 
> nginx.conf : http://pastebin.com/KnpAFm3h 
> nextcloud.conf.https : http://pastebin.com/ZzDy9puJ
> 
> nginx/error.log (debug level):
> 
> 2016/10/01 11:12:15 [notice] 14944#14944: built by gcc 4.9.2 (Raspbian
> 4.9.2-10) 
> 2016/10/01 11:12:15 [notice] 14944#14944: OS: Linux 4.4.21-v7+

Start with checking your optimization flags.  GCC as shipped in 
Raspbian (Raspbian 4.9.2-10) is known to produce broken code at 
the -O2 optimization level, see details here:

https://trac.nginx.org/nginx/ticket/912

[...]

-- 
Maxim Dounin
http://nginx.org/

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