This file contains hidden or 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
| OPTION_1=${OPTION_1} | |
| OPTION_2=${OPTION_2} | |
| OPTION_3=${OPTION_3} | |
| OPTION_4=${OPTION_4} | |
| OPTION_5=${OPTION_5} |
This file contains hidden or 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
| SED=`which sed` | |
| CURRENT_DIR=`dirname $0` | |
| echo "What is the domain?" | |
| read DOMAIN | |
| # check the domain is valid! | |
| PATTERN="^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$"; | |
| if [[ "$DOMAIN" =~ $PATTERN ]]; then | |
| DOMAIN=`echo $DOMAIN | tr '[A-Z]' '[a-z]'` |
This file contains hidden or 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/sh | |
| apt-get -y install git bc | |
| git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt | |
| mkdir /etc/letsencrypt |
This file contains hidden or 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
| upstream php5-fpm-sock { | |
| server unix:/var/run/php5-fpm.sock; | |
| } | |
| server { | |
| listen 80; | |
| server_name 0.0.0.0; | |
| root /var/www/multicraft/; | |
| index index.php; |
This file contains hidden or 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 80; | |
| server_name www.example.com example.com; | |
| # Redirect all traffic to SSL | |
| rewrite ^ https://$server_name$request_uri? permanent; | |
| } | |
| server { | |
| listen 443 ssl default_server; |
This file contains hidden or 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 | |
| #OpenVPN Server on CentOS OpenVZ VPS Script by Yasyf Mohamedali (http://blog.yasyf.com/2012/08/01/openvpn-server-on-a-centos-openvz-vps) | |
| #Adapted from various scripts around the net, including http://www.openvz.ca/blog/2010/11/18/setup-tuntap-openvpn-server-openvz-5-minutes/ | |
| #https://gist.github.com/3230440 | |
| tunstate=`cat /dev/net/tun` | |
| if [ "$tunstate" = "cat: /dev/net/tun: Permission denied" ] | |
| then | |
| clear | |
| echo "Sorry, but it seems that TUN/TAP is not enabled on your VPS." | |
| exit |