Let's say you want to host domains first.com
and second.com
.
Create folders for their files:
[mysqld] | |
## After edit config you have to remove log files and restart mysql server | |
## because after changing innodb-log-file-size you should recreate ib_logfiles | |
## Stop MySQL server | |
## rm /data/dir/ib_logfile* | |
## Run MySQL server | |
##Table open cache under MacOS and MySQL 5.6 should be 250. | |
##Otherwise you will get error MySQL server has gone away | |
##table-open-cache = 250 |
#!/bin/sh | |
# ipset-country | |
# Block countries using iptables + ipset + ipdeny.com | |
# run this script from cron, e.g. /etc/cron.daily | |
# to run on boot you can also add it to e.g. /etc/rc.local | |
# please note: this script will insert an iptables REJECT |
#!/bin/bash | |
# Description: Uses IPSET and IPTABLES to block full countries from accessing the server for all ports and protocols | |
# Syntax: countries_block.sh countrycode [countrycode] ...... | |
# Use the standard locale country codes to get the proper IP list. eg. | |
# countries_block.sh cn ru ro | |
# Will create tables that block all requests from China, Russia and Romania | |
# Note: To get a sorted list of the inserted IPSet IPs for example China list(cn) run the command: | |
# ipset list cn | sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4 | |
# ############################################################################# | |
# Defining some defaults |
<?php | |
namespace Elephant\CFParent\Helper; | |
class ElephantData extends \Magento\Framework\App\Helper\AbstractHelper | |
{ | |
public function __construct( | |
\Magento\Framework\App\Helper\Context $context, | |
array $data = [] |
#!/bin/bash | |
if curl --head -sf http://yourdomain.com/some-script.php -o /dev/null; then | |
echo "PHP FPM is up" | |
else | |
service php5-fpm restart && service nginx restart && service mysql restart | |
echo "Opps .. service was down" | mail -s "PHP-FPM Service Down" [email protected] -aFrom:[email protected] | |
fi |
[Install] | |
WantedBy=multi-user.target | |
[Unit] | |
Description=Google Cloud Compute Engine SQL Proxy | |
Requires=networking.service | |
After=networking.service | |
[Service] | |
Type=simple |
#!/bin/bash | |
## | |
# Name: GeoIP Firewall script | |
# Author: Pandry | |
# Version: 0.1 | |
# Description: This is a simple script that will set up a GeoIP firewall blocking all the zones excecpt the specified ones | |
# it is possible to add the whitelisted zones @ line 47 | |
# Additional notes: Usage of [iprange](https://github.com/firehol/iprange) is suggested | |
# for best performances |
# Directories & files | |
Disallow: /wishlist/ | |
Disallow: /customer/ | |
Disallow: /checkout/ | |
Disallow: /catalog/ | |
Disallow: /catalogsearch/ | |
Disallow: /downloader/ | |
Disallow: /braintree/ | |
Disallow: /order/ | |
Disallow: /rma/ |
{ | |
"envio_AD": { | |
"label": "Andorra", | |
"description": "Envío normal Andorra", | |
"shipto": "AD", | |
"conditions": "{skus_es_only.conditions} && {cart.free_shipping}!='true'", | |
"fees": "{table {cart.weight} in 5.0100:5.5100,10.0100:5.5100,15.0100:6.9200,20.0100:8.0000,25.0100:10.4500,30.0100:11.3400,35.0100:11.3400,40.0100:11.3400,45.0100:11.3800,50.0100:12.4100,60.0100:13.4400,70.0100:15.5000,80.0100:17.5700,90.0100:19.3000,100.0100:21.0200,110.0100:22.7500,120.0100:27.0700,130.0100:27.0700,140.0100:31.3900,150.0100:31.3900,160.0100:35.7100,170.0100:35.7100,180.0100:39.0800,190.0100:39.0800,10000.0000:39.0800}" | |
}, | |
"envio_EU1": { | |
"label": "Países: AT, BG, CH, CY, CZ, DK, EE, FI, GR, HU, IE, IS, IT, LI, LT, LU, LV, MC, MT, NO, PL, RO, SK, SI, SE", |