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
| 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 = "localhost"; | |
| .port = "8080"; | |
| .first_byte_timeout = 600s; | |
| } | |
| acl purge { |
| 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"; |
| 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"; | |
| } |
| ###General rewrites | |
| location @shopware { | |
| rewrite / /shopware.php; | |
| } | |
| # use shopware.php as index.php | |
| location ~ ^/ { | |
| # rewrite / /shopware.php; | |
| index shopware.php index.php; |
| ## 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; |
| # 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 |
| #!/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) |
| #!/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 |