Jesin's Blog

Welcome to the Portal of Technology

  • Facebook
  • GitHub
  • Google+
  • RSS
  • Twitter
  • Home
  • Categories
    • Domains
    • Linux
    • Networking
    • PHP
    • Virtualization
    • Web Design
    • Web Servers
    • Windows
  • WordPress Plugins
    • Custom Error Pages
    • HTTP Digest Authentication
    • Mailgun Email Validator
  • Toolbox
    • DNS Lookup Tool
    • htdigest Generator Tool Online
    • htpasswd Generator Tool Online
    • HTTP Headers Lookup Tool
    • MD5 Encryption Tool
    • Open Port Check Tool
    • SHA-1 Encryption Tool
    • URL Encoding/Decoding Tool
  • About Me
  • Contact Me
  • Sitemap
Home ›
nginx

How to add the HSTS header only for HTTPS requests on Nginx

September 22, 2016 Web Servers Jesin A Leave a Comment

security padlock

HTTP Strict Transport Security is a mechanism through which web servers declare themselves to be accessible only over secure connections (HTTPS). This mechanism is implemented by configuring the web server to send a HSTS header in its responses. A typical HSTS header looks like the following:

Strict-Transport-Security: max-age=31536000; includeSubDomains

The RFC standard for HTTP Strict Transport Security – RFC6797 specifies under Section 7.2 that a web server should not include this header in plain-text HTTP responses.Continue Reading…

Tags: nginx, ssl

How to install PHPMyAdmin on an Nginx Web Server

July 16, 2015 Linux, Web Servers Jesin A 5 Comments

nginx phpmyadmin thumbnail

This article will show you how to install the latest version of PHPMyAdmin on Nginx. We will be obtaining the latest stable version of PHPMyAdmin from the GitHub repository and periodically pull updates for it via Git.

Create a directory for PHPMyAdmin and change its ownership to the www-data user.
Continue Reading…

Tags: nginx, phpmyadmin

How to fix connect() to php5-fpm.sock failed (13: Permission denied) while connecting to upstream Nginx error

October 11, 2014 Web Servers Jesin A 2 Comments

nginx php5 fpm socket permission denied thumbnail

I encountered this problem after updating PHP to 5.5.12. I use Nginx with PHP5 FPM and after the updating PHP I was seeing 502 Gateway Error pages. Nginx’s error log file (/var/log/nginx/error.log) had the following in it:

2014/05/08 06:22:24 [crit] 24538#0: *292759 connect() to unix:/var/run/php5-fpm.sock failed (13: Permission denied) while connecting to upstream, client: 1.1.1.1, server: websistent.com, request: "GET /wordpress-custom-403-401-error-page/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "websistent.com"

It was clear that Nginx couldn’t access PHP FPM’s socket file due to insufficient permissions. But everything was working fine till I updated PHP so something had changed in version 5.5.12.Continue Reading…

Tags: nginx, nginx errors

Fix the client intended to send too large body nginx error

February 25, 2013 Web Servers Jesin A 24 Comments

I recently encountered this error on this WordPress installation running on nginx webserver. I tried to upload a file of size 1.14MB for the article download vmnetcfg.exe when WordPress displayed “HTTP error” in red. I thought it was a problem with either PHP’s max_execution_time or max_upload_filesize directives, but modifying them did not solve the problem. Taking a look at the PHP error log I couldn’t find anything helpful. Finally I saw nginx’s error log which contained this error.Continue Reading…

Tags: nginx, nginx errors

Get a wealth of information delivered to your inbox. Subscribe and never miss a single article.

  • Tutorials and howtos
  • Code, scripts and commands
  • Online Tools

* No spam, unsubscribe anytime

Hire Me

  • SSL installation and hardening (A+ on Qualys SSL test)
  • Apache & Nginx configuration
  • Email deliverability improvement (10/10 on Mail Tester & MailGenius)
  • WordPress customization, optimization and migration
  • and much more…

    Tools

    • DNS Lookup Tool
    • htdigest Generator Tool Online
    • htpasswd Generator Tool Online
    • HTTP Headers Lookup Tool
    • MD5 Encryption Tool
    • Open Port Check Tool
    • SHA-1 Encryption Tool
    • URL Encoding/Decoding Tool

    Nav

    • Home
    • About Me
    • Contact Me
    • Privacy Policy
    • Sitemap
    Vultr SSD VPS

    Creative Commons License
    Jesin's Blog by Jesin A is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
    Based on a work at websistent.com.