View content-scan.sh
#!/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 |
View whitelist-development-exception.conf
# 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"; |
View cron-debugger.sh
#!/bin/bash | |
# This script is a debug utility for cronjobs as explained in: | |
# - https://support.hypernode.com/knowledgebase/configure-cronjobs-on-hypernode/ | |
# It logs all output and timing to a log file | |
# | |
# To use it, download the script, add the executable bit and put it in your cronjob: | |
# */5 * * * * /data/web/bin/debug-cron php -f /data/web/public/cron.php | |
LOGDIR="/data/web/public/var/log/crons" | |
TIMESTAMP="$( date '+%Y%m%d%H%M' )" |
View blocklist.txt
360Spider | |
80legs\.com | |
ADmantX | |
Abonti | |
AcoonBot | |
Acunetix | |
AddThis\.com | |
AhrefsBot | |
AngloINFO | |
Antelope |
View env.php
<?php | |
return array ( | |
'backend' => array ( | |
'frontName' => 'webshop_admin', | |
), | |
'crypt' => array ( | |
'key' => '355fb68f9e21189d170c1d759616cd58', | |
), | |
'db' => array ( |
View cache-warmer.py
#!/usr/bin/env python | |
""" | |
Warm the caches of your website by crawling each page defined in sitemap.xml. | |
To use, download this file and make it executable. Then run: | |
./cache-warmer.py --threads 4 --file /data/web/public/sitemap.xml -v | |
""" | |
import argparse | |
import multiprocessing.pool as mpool | |
import os.path | |
import re |
View cache-warmer.sh
#!/bin/bash | |
if [ "$#" -ne 1 ] || [ "x$1" == "x" ] ; then | |
echo "Usage: $0 <sitemap.xml>" | |
exit 0; | |
fi | |
if [ ! -f "$1" ]; then | |
echo "Sitemap file $1 not found! Exit!" | |
exit 1 |
View change_magento1_staging_baseurls.py
#!/usr/bin/env python | |
""" | |
Set the base-urls for your Magento 1 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_magento1_staging_baseurls.py | |
After use, check your base-urls by issuing: | |
n98-magerun sys:store:config:base-url:list | |
This script requires n98-magerun. |
View searchd-watchdog.py
#!/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) |
View server.shopware
## 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; |
NewerOlder