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:
Tag: nginx
Jan 10 2023
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.
Dec 23 2022
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 …
Dec 23 2022
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 …
Sep 02 2020
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 …
Sep 02 2020
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 …
Sep 02 2020
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:
1 |
*1 upstream prematurely closed connection while reading response header from upstream, client: 127.0.0.1, server: , request: "GET /check HTTP/1.1", upstream: "http://127.0.0.1:4005/check", host: "example.com" |
Aug 19 2020
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:
1 2 3 |
*ipofserver* - - [24/Jan/2019:13:40:13 +0100] "GET /wp-content/***.jpg HTTP/1.1" 200 1806 "https://***.com/*" "Serf/1.3.9 (mod_pagespeed/1.13.35.2-0)" *ipofserver* - - [24/Jan/2019:13:40:13 +0100] "GET /wp-content/***.jpg HTTP/1.1" 200 1806 "https://***.com/*" "Serf/1.3.9 (mod_pagespeed/1.13.35.2-0)" *ipofserver* - - [24/Jan/2019:13:40:13 +0100] "GET /wp-content/***.jpg HTTP/1.1" 200 1806 "https://***.com/*" "Serf/1.3.9 (mod_pagespeed/1.13.35.2-0)" |
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
Jan 24 2020
Magento server performance configuration
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.
Feb 15 2018
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. …
- 1
- 2