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
# UPDATED 17 February 2019 | |
# Redirect all HTTP traffic to HTTPS | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name www.domain.com domain.com; | |
return 301 https://$host$request_uri; | |
} | |
# SSL configuration |
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
######################################################################### | |
# ================================================== # | |
# $ Mikrotik RouterOS update script for CloudFlare $ # | |
# ================================================== # | |
# # | |
# - You need a CloudFlare account & api key (look under settings), # | |
# a zone and A record in it # | |
# - All variables in first section are obvious, except CFid, # | |
# To obtain CFid use following command in any unix shell: # | |
# curl https://www.cloudflare.com/api_json.html -d 'a=rec_load_all' -d 'tkn=YOUR_API_KEY' -d '[email protected]' -d 'z=domain.com'|python -mjson.tool |