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
INSERT INTO url_rewrite | |
SELECT | |
NULL AS url_rewrite_id, | |
'cms-page' AS entity_type, | |
cp.page_id AS entity_id, | |
cp.identifier AS request_path, | |
CONCAT('cms/page/view/page_id/', cp.page_id) AS target_path, | |
0 AS redirect_type, | |
1 AS store_id, | |
NULL as description, |
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
import pycurl | |
import json | |
import math | |
import time | |
from io import BytesIO | |
import sys | |
import requests | |
from requests.auth import HTTPBasicAuth | |
from datetime import datetime |
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
Take care of your versions, do not downgrade! | |
1. Create Docker Image first (see 01_z_docker.sh) | |
2. Stop Docker Instance (docker stop mariadb-103) | |
3. Check data directory (permissions ls -aln, keep in mind, sample "chown 999:999") | |
4. Set Permission to Root User, on System MySQL/Mariadb (see 02_mysql_root.sql), may u have to start with --skip-grant-tables | |
4. Stop System MySQL/MariaDB | |
5. Copy Data /var/lib/mysql to new place for Docker ( rsync --delete --progress --numeric-ids -axAhHPc /old/ /new/ ) | |
6. Chown /new/ Data to set the correct permission for the docker container | |
7. Start Both Container and System MariaDb |
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
# inside of http {}, outside of server | |
# may create file: /etc/nginx/conf.d/webp.conf | |
map $http_accept $webp_suffix { | |
default ""; | |
"~*webp" ".webp"; | |
} | |
# inside server {} | |
# /etc/nginx/sites.d/*.conf | |
location ^~ /thumbnail/ { |
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 version 5.0 is not supported so it should be 4.0 even though actually used Varnish version is 6 | |
vcl 4.0; | |
import std; | |
# The minimal Varnish version is 6.0 | |
# For SSL offloading, pass the following header in your proxy server or load balancer: 'SSL-OFFLOADED: https' | |
backend default { | |
.host = "10.0.1.2"; | |
.port = "80"; |
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 | |
exit; // change url first | |
$mainXmlUrl = 'https://www.example.com/sitemap.xml'; | |
$mainXmlContent = curlUrlExec($mainXmlUrl); | |
$mainXml = @simplexml_load_string($mainXmlContent); | |
unset($mainXmlContent); |
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
sessions: | |
listen: 127.0.0.1:6386 | |
hash: fnv1a_64 | |
distribution: modula | |
auto_eject_hosts: true | |
redis: true | |
redis_db: 6 | |
server_retry_timeout: 2000 | |
server_failure_limit: 1 | |
servers: |
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 | |
$hostips = array('999.999.999.999', '888.888.888.888'); | |
$certName = 'mostly.server.hostname.tld'; | |
$domainsList = array( | |
'domain1.tld', | |
'domain2.tld', | |
); | |
$certdns = trim(shell_exec('openssl x509 -noout -text -in /etc/letsencrypt/live/'.$certName.'/cert.pem | grep DNS:')); |
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
iptables -t nat -A POSTROUTING -m mark --mark 0x0050/0xFFFFFFFF -j SNAT --to-source xxx.xxx.xxx.xxx | |
#Hex = Decimal | |
#0x0050 = 80 |
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
server { | |
listen 127.0.0.1:8080; | |
index index.php index.html; | |
server_name varnish.default.tld; | |
root /home/USER/htdocs/public/; | |
location /recovery/install { | |
index index.php; | |
try_files $uri /recovery/install/index.php$is_args$args; |
NewerOlder