Tag: nginx

Nginx reverse proxy to .onion site in TOR network

As Tor is not a http proxy but a Socks one you cannot insert .onion name or IP in proxy_pass directive. In order to use Nginx as reverse proxy to .onion sites you will need a socat. ​Socat is a command line based utility that establishes two bidirectional data streams and transfers between them. This …

Continue reading

Nginx close upstream connection after request

Nginx was configured as reverse proxy for an upstream server that servers a website. Upon checking the setup I encountered the 502 Bad gateway error. In Nginx error.log I found the following line:

Continue reading

How to remove mod_pagespeed from access.log

If you have mod_pagespeed installed on your webserver you may notice the following lines in access.log file:

Depending on the size of your website requests from mod_pagespeed can add flood your logfiles and their size will be significantly larger. Here is how you can exclude mod_pagespeed requests from access.log file

Continue reading

Magento server performance configuration

magento-server-perofrmance-setup

There are best practices in Magento 2 performance configuration of operating system, MySQL, PHP and webserver. This article covers important configurations of all components that will speed up the Magento site.

Continue reading

Nginx Display Active Connections

nginx-display-active-connections

How to watch nginx server status and connections requests per second under Linux or Unix like operating systems? For such a task nginx server has a module called HttpStubStatusModule. This module provides the ability to get some status from nginx. You will get the following information: Number of all open connections. Stats about accepted connections. …

Continue reading

Nginx HTTPOnly and Secure Cookie

Having HTTPOnly and Secure in HTTP response header can help to protect your web applications from cross-site scripting and session manipulation attacks. There are two ways to configure HTTPOnly Secure Cookie Attribute in Nginx.

Continue reading

nginx SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch

This error can happen for a chain of certificates merged in one .crt file. The reason is that nginx tries to apply a private key to the first certificate in a crt file. nginx needs that the first certificate in a .crt file would be a server certificate. Thus the correct order in a .crt …

Continue reading