For use after an upgrade to verify the correct working of Magento
- Activate all logs on the server (PHP, MySQL, Magento, mail, etc)
- Check meta tags in HTML
#!/usr/bin/env python | |
""" | |
Set the base-urls for your Magento 2 staging environment by copying and adjusting the base-urls from your production site. | |
To use, download the file and make it executable. Then run: | |
./change_magento2_staging_baseurls.py | |
After use, check your base-urls by issuing: | |
n98-magerun2 sys:store:config:base-url:list | |
This script requires n98-magerun2. |
#!/bin/bash | |
# This script is a very basic curl utility to analyze urls. | |
# To use it, download the file, make it executable, and run: | |
# ./curl_speedtest.sh https://www.byte.nl | |
URL="$1" | |
if [ "x${URL}" == "x" ] || [[ ! "${URL}" =~ "http" ]] ; then | |
echo "Usage: $0 <url>" | |
exit 1 |
#!/bin/bash | |
# Find files that contain suspicious php code | |
grep -RE 'preg_replace\(|eval\(|base64_decode\(' --include='*.php' . | cut -d: -f 1 | sort -u | while read line ; do echo $line | cat - $line | less ; done |
#!/usr/bin/env python | |
""" Hypernode searchd cron watchdog | |
This script checks the pid of the searchd daemon and restarts it when the service is not running | |
It works for both Magento 1 and Magento 2 and for both live and staging. | |
To run it, add it to the crontab of your hypernode. | |
For Magento 1: | |
* * * * * flock -n ~/.searchd_live /data/web/searchd-watchdog.py --environment live --version 1 (live) |
# Original blog post: <https://mnx.io/blog/a-proper-server-naming-scheme/> | |
# Original word list: <http://web.archive.org/web/20091003023412/http://tothink.com/mnemonic/wordlist.txt> | |
# Sample usage: `curl <gist> | tail --lines +4 | shuf | head --lines 1` | |
acrobat | |
africa | |
alaska | |
albert | |
albino | |
album | |
alcohol |
## Author: Benjamin Cremer | |
## Shopware nginx rules. | |
## Heavily Inspired by https://github.com/perusio/drupal-with-nginx/ | |
## Designed to be included in any server {} block. | |
## Please note that you need a PHP-FPM upstream configured in the http context, and its name set in the $fpm_upstream variable. | |
## https://github.com/bcremer/shopware-with-nginx | |
# don't log favicon hits | |
location = /favicon.ico { | |
log_not_found off; |
###General rewrites | |
location @shopware { | |
rewrite / /shopware.php; | |
} | |
# use shopware.php as index.php | |
location ~ ^/ { | |
# rewrite / /shopware.php; | |
index shopware.php index.php; |
vcl 4.0; | |
import std; | |
# The minimal Varnish version is 4.0 | |
# For SSL offloading, pass the following header in your proxy server or load balancer: 'X-Forwarded-Proto: https' | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
} |
# You can whitelist request that should be exempt from the development | |
# basic auth. | |
# It's possible to whitelist request based on their IP address, range, | |
# User-Agent, or by the requested URL. | |
# Please note though, that google and bing bots will always remain | |
# blocked on development nodes! | |
# Both IP addresses and IP ranges can be whitelisted here. | |
geo $development_exceptions_ip { | |
default "Development restricted area"; |