Tag: nginx

How to create full-chain pem certificate

You can use your favourite text editor to create a combined full-chain pem certificate. The most important here is the order. The correct order in a .crt file will be the following:

Continue reading

How to handle React routes in Apache and Nginx

Usually little setup of Apache and Nginx is needed so they can handle React routes properly without trying to treat them as real files or directories resulting in 404 Not Found in React. Here are the snippets of the React routes related settings for Apache and Nginx.

Continue reading

Implement Secure Headers in Apache and Nginx

HTTP security headers are very important part of website security as it protect you against different types of attacks including, XSS, SQL injection, clickjacking, etc. When you visit any website from your web browser, your browser requests it from the web server where the web site is hosted on. The web server then responds with …

Continue reading

Implementing Cache control headers in Nginx and Apache

Cache-Control are HTTP cache headers that holds instructions for caching for requests and responses. It is used to defines how a resource is cached, where it’s cached and its maximum age before expiring. When you visit a website, your browser will save images and website data in a store called the cache. When you revisit …

Continue reading

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

How To Debug Nginx Reverse Proxy Issues

Nginx server is loved by many people for its proxy capabilities and ease of configuration. A simple proxy_pass can allow you to connect to any of the backends such as GoLang, php-fpm, NodeJS, another Nginx, Tomcat, Apache, Gunicorn, uwsgi, Flask, Django, an external CDN and many more. When proxying a request to another server, you …

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

Load more