Re: Nginx as Reverse Proxy for Tomcat + SSL

2013-08-26 Thread Payam Chychi
Ssl proxy with nginx, copy over the ssl keys from the end site to nginx. Now if u want ssl from nginx, simply https the connection and sign a cert... What am i missing here? Are you looking for an actual config sample? -- Payam Chychi Network Engineer / Security Specialist On Wednesday, 21

Re: Nginx as Reverse Proxy for Tomcat + SSL

2013-08-26 Thread dt0x
Assuming that this happens all on one machine, Tomcat can be set to listen only on localhost e.g. 127.0.0.1:8080 in which case SSL from nginx reverse proxy becomes redundant. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,24126,242227#msg-242227 _

Re: How to serve PHP files outside the public folder?

2013-08-26 Thread Francis Daly
On Mon, Aug 26, 2013 at 11:12:15PM +0100, Francis Daly wrote: > Probably one of "location ^~ /private/"; or else "location ~ > /private/*.\php$" before your "location ~ \.php$", should work. That's "^/private/*\.php$", of course. Fat fingers... f -- Francis Dalyfran...@daoine.or

Re: How to serve PHP files outside the public folder?

2013-08-26 Thread Francis Daly
On Sun, Aug 25, 2013 at 03:14:55AM -0400, etrader wrote: > now I want to keep a folder outside the public folder to be served as a > > location /private/ { > /* serving static files from /private/$server_name/ */ > location ~ \.php$ { > /* serving PHP scripts from /private/$server_name/ */ > } >

Re: Fake Basic Auth

2013-08-26 Thread Francis Daly
On Sun, Aug 25, 2013 at 08:53:57AM +0200, Christian Felsing wrote: Hi there, > Nginx should be used as a reverse proxy and configured for client > certificate authentication. Backoffice application supports basic auth only. > Apache 2.4 solution for that kind of problems is "Fake Basic Auth" so >

Re: Fake Basic Auth

2013-08-26 Thread Christian Felsing
Sorry, does not what I need: proxy_pass http://myapache:8000; rewrite_by_lua ' ngx.var.remote_user = "user" ngx.var.remote_password = "secret" '; This should fake a 401 login but I get 2013/08/26 20:11:11 [error] 19175#0: *2 lua entry thre

RE: 504 Gateway Time-out when calling curl_exec() in PHP with SSL peer verification (CURLOPT_SSL_VERIFYPEER) off

2013-08-26 Thread Lukas Tribus
Hi! > If this were the root cause, wouldn't the cURL call fail in the way way, > regardless of the CURLOPT_SSL_VERIFYPEER value? In other words, it > doesn't seem like changing this cURL option would change the number of > backend processes required to handle the request(s). But I could be wrong.

Re: 504 Gateway Time-out when calling curl_exec() in PHP with SSL peer verification (CURLOPT_SSL_VERIFYPEER) off

2013-08-26 Thread Ben Johnson
Thanks for the suggestion, itpp2012. I tried adding those directives to the batch script that starts php-cgi.exe, but the problem persists. What I find strange is that the problem occurs only when I set peer verification to false: curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); When I set this

Re: Securing nginx: Workers per server block under specific user?

2013-08-26 Thread Alexander Kunz - Wishmedia GmbH
Am 26.08.2013 13:23, schrieb Valentin V. Bartenev: > On Monday 26 August 2013 15:14:32 - - wrote: > [...] >> That >> is really bad because I would have the same security problem as I had >> before with cherokee. With one line of php he could read from any "site" >> folder (see above). I could t

Re: Securing nginx: Workers per server block under specific user?

2013-08-26 Thread Valentin V. Bartenev
On Monday 26 August 2013 15:14:32 - - wrote: [...] > That > is really bad because I would have the same security problem as I had > before with cherokee. With one line of php he could read from any "site" > folder (see above). I could tackle that problem by assigning rwx-- > permissions to al

Securing nginx: Workers per server block under specific user?

2013-08-26 Thread - -
Hello, I don't quite understand how this works. Until now I was running my websites under Cherokee Web Server. Cherokee ran under user www-data and all my websites shared the same permissions (www-data:www-data rwxrwx---). That worked well, but then I also realised: If someone would be able to