Let's say you want to host domains first.com
and second.com
.
Create folders for their files:
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; |
nginx/ | |
!nginx/.gitkeep | |
!nginx/logs/.gitkeep | |
src/ | |
tmp/ |
# Optimized my.cnf configuration for MySQL/MariaSQL | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# ~ Updated January 2020 ~ | |
# | |
# | |
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores. | |
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage. | |
# |
# maximum capability of system | |
user@ubuntu:~$ cat /proc/sys/fs/file-max | |
708444 | |
# available limit | |
user@ubuntu:~$ ulimit -n | |
1024 | |
# To increase the available limit to say 200000 | |
user@ubuntu:~$ sudo vim /etc/sysctl.conf |
{ | |
"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", |
# Directories & files | |
Disallow: /wishlist/ | |
Disallow: /customer/ | |
Disallow: /checkout/ | |
Disallow: /catalog/ | |
Disallow: /catalogsearch/ | |
Disallow: /downloader/ | |
Disallow: /braintree/ | |
Disallow: /order/ | |
Disallow: /rma/ |
#!/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 |
[Install] | |
WantedBy=multi-user.target | |
[Unit] | |
Description=Google Cloud Compute Engine SQL Proxy | |
Requires=networking.service | |
After=networking.service | |
[Service] | |
Type=simple |
#!/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 |