How to send plain text response from Nginx

You can use a return statement in Nginx to send a plain text response. In your Nginx server entry, add

How to block bad bots User-Agents in Nginx

To block bots by User-Agent in Nginx, add the following to the server entry of the website. if ($http_user_agent ~

Nginx ModSecurity Not able to open file

On an Nginx server after updating Nginx and ModSecurity, I got the following error [root@localhost ~]# nginx -t nginx: [emerg]

How to configure Security Headers in Nginx

You can add the following headers in your nginx.conf or server entry to improve website security add_header X-Frame-Options sameorigin; add_header

Nginx configuration for Angular

Angular is a single-page application (SPA) framework. To serve Angular application using Nginx web server, use following configuration. server {

Nginx Configuration for Drupal 7

Here is Drupal 7 server configuration for Nginx with letsencrypt SSL. server { listen 443 ssl http2; ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem; #

Nginx Redirect HTTP to HTTPS

To force SSL (HTTPS) on a website hosted on an Nginx web server, edit server entry for the website, add

Nginx Web Server

Nginx php-fpm No input file specified

When accessing PHP files from location block that have different document root specified using alias, i get error No input

Nginx Web Server

How to hide Nginx version

On a default installation of the Nginx web server, the error pages show the version of Nginx software running on

Nginx Web Server

Nginx Rate Limiting

Nginx web server support rate-limiting with module ngx_http_limit_req_module. Block WordPress wp-login.php attack To block the WordPress wp-login.php attack, add the

How to redirect a domain with html extension in Nginx

How to redirect a domain with html extension in Nginx

A WordPress website needs to migrate to a different domain, on a new domain site use static HTML pages. On

Nginx file upload error

Nginx file upload error

When uploading a file on a PHP Application running under an Nginx web server, I get the following error 2021/08/14