Skip to content

Instantly share code, notes, and snippets.

View Yoda-BZH's full-sized avatar

Yoda-BZH Yoda-BZH

View GitHub Profile
<VirtualHost 1.1.1.1:80>
ServerName example.com
RewriteEngine on
RewriteRule ^(.*) http://www.example.com [QSA,L,R=301]
CustomLog /home/www/example.com/log/apache/domaine-redirect.access.log combined env=!no_log
ErrorLog /home/www/example.com/log/apache/domaine-redirect.error.log
</VirtualHost>
<VirtualHost 1.1.1.1:80>
ServerAlias www.example.com
@Yoda-BZH
Yoda-BZH / apache-balancer.sh
Last active June 21, 2018 08:24 — forked from SeonghoonKim/apache-balancer.sh
Apache HTTPD balancer-manager control script
#!/bin/sh
# Author: SeonghoonKim https://gist.github.com/SeonghoonKim/5385982
# Author: Yoda-BZH https://gist.github.com/Yoda-BZH/05a7b33df1740882a8e39e0b38de682d
# Set up a default search path
PATH="/usr/bin:/bin"
CURL=`which curl`
if [ -z "$CURL" ]
then