# Skip .git, .htpasswd etc
location ~ /\.(git|svn|ht) {
return 404;
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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' )" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
User-agent: * | |
# Directories | |
Disallow: /app/ | |
Disallow: /bin/ | |
Disallow: /dev/ | |
Disallow: /lib/ | |
Disallow: /phpserver/ | |
Disallow: /pkginfo/ | |
Disallow: /report/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###General rewrites | |
location @shopware { | |
rewrite / /shopware.php; | |
} | |
# use shopware.php as index.php | |
location ~ ^/ { | |
# rewrite / /shopware.php; | |
index shopware.php index.php; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Set the base-urls for your Magento 2 installation to support only https. | |
To use, download the file and make it executable. Then run: | |
./change_magento2_base_urls_to_https.py | |
After use, check your base-urls by issuing: | |
n98-magerun2 sys:store:config:base-url:list | |
This script requires n98-magerun2. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
This script is a basic example of how to use GeoIP data in PHP. | |
It returns an overview of all available constants retrieved from the Maxmind GeoIP databases. | |
*/ | |
$elements = array( | |
"country_code" => getenv('GEOIP_COUNTRY_CODE'), | |
"country_code3" => getenv('GEOIP_COUNTRY_CODE3'), | |
"country_name" => getenv('GEOIP_COUNTRY_NAME'), |