Configure Nginx Fast CGI cache ON error_page 404

2018-05-01 Thread Vincent
Hello, I would like to cache (PHP fast_cgi) 404 response. error_page 404 = /url_rewriting.php; In my url_rewriting.php I generate image by requiring the render_img.php file: if(strpos($_SERVER['REQUEST_URI'], 'render/framed/file') !== FALSE) {

Simple steps to harden Nginx for home use?

2018-05-01 Thread Winfried
Hello, I use Nginx on a home Debian appliance to run a couple of personal web sites. It's the only port reachable from the Net through the ADSL model with NAT firewall enabled. Recently, the server was no longer responding and I couldn't log on: [code] (initramfs) root /bin/sh: root: not found

Knowing the server port inside Perl code

2018-05-01 Thread Ondrej Jombik
When using mail module for SMTP and doing auth using Perl code, it might be handy to know entry port number. For example 25/TCP, 465/TCP or 587/TCP; those are the most used ones. I thought this would be somewhere among provided headers: $request->header_in('Auth-Method');