This guide is for installing redis as a replacement for the memcached php session store when using php71u IUS packages on a CentOS-6 environment.
#!/usr/bin/env expect | |
set env(HOME) /usr/local/bin | |
set env(SHELL) /bin/bash | |
set env(TERM) xterm | |
set timeout 3 | |
# Destination IP address | |
set HOST [lindex ${argv} 0] |
#!/usr/bin/env expect | |
set env(HOME) /usr/local/bin | |
set env(SHELL) /bin/bash | |
set env(TERM) xterm | |
set timeout 15 | |
# Source IP address | |
set SOURCE_ADDRESS [lindex ${argv} 0] |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Maintenance</title> | |
<style> | |
body{color:#666;background-color:#f1f1f1;font-family:sans-serif;margin:12%;max-width:50%;} | |
h1,h2{color:#333;font-size:4rem;font-weight:400;text-transform:uppercase;} | |
h2{color:#333;font-size:2rem;} | |
p{font-size:1.5rem;} | |
</style> |
- Activate/Deactivate with a file.
- Bypass with a custom request header.
With the following Apache Rewrite rule, temporarily redirect all traffic to a maintenance page when a file named maintenance
exists at the same level as the DocumentRoot directory. i.e. if your DocumentRoot is /var/www/public_html/
then creating the file /var/www/maintenance
would trigger Maintenance mode.
Use something like the ModHeader Chrome browser extension to bypass the maintenance page by setting a X-Maintenance
request header with a value of tF0BOCn4z8HgG2Kw
(replace this with your own unique passcode string).
Use CacheTool to view stats for and manage PHP's APC or Zend Opcache opcode cache.
Using CacheTool you can clear the PHP opcache without reloading PHP-FPM.
In this example, CacheTool is to be installed alongside a demonstration PHP-FPM Docker container.
# Requirement: https://github.com/jdeathe/centos-ssh/issues/472 | |
# | |
# On CentOS-7 Host install docker-compose: | |
# sudo yum -y upgrade python* | |
# sudo yum -y install epel-release | |
# sudo yum -y install python-pip | |
# sudo pip install docker-compose | |
# OR Use container alias and add the following 2 environment variables to .env | |
# Ref: https://gist.github.com/jdeathe/e7b09222bb44a2efa6a67b893fe35ac1 | |
# |
Generating a self-signed certificate is a common task and the command to generate one with openssl
is well known and well documented. Generating a certificate that includes subjectAltName is not so straght forward however. The following example demonstrates how to generate a SAN certificate without making a permanent change to the openssl configuration.
$ export SAN="DNS:www.domain.localdomain,DNS:domain.localdomain"