Advertisement
Guest User

Untitled

a guest
May 31st, 2017
447
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -----------------------------------
  2. Prep Work
  3. -----------------------------------
  4. 1. Forward the following ports in the router:
  5. 443, 10443
  6. 2. Forward the following ports in the Torguard VPN:
  7. 10443
  8. 3. Add the following to the hosts file:
  9. #Web Servers
  10. 127.0.0.1 localhost
  11. 127.0.0.1 [domain_name]
  12. ::1 localhost
  13. ::1 [domain_name]
  14.  
  15. --------------------------------------
  16. Set Up Domain Name
  17. --------------------------------------
  18. 1. Purchase a domain name from google domains [domain_name]
  19. 2. Sign up for Cloudflare
  20. 3. Enter the domain name into Cloudflare, and generate new nameservers
  21. 4. Enter those custom nameservers into google domain settings
  22. 5. Have Cloudflare refresh until the site is active
  23. 6. In Cloudflare, goto: DNS and add the record:
  24. Type: A, Name: @, IPv4 Address: [VPN IP], TTL: Automatic TTL, then hit 'Add Record'
  25. 7. On the Cloudflare overview page, change SSL to 'Full (strict)'
  26. 8. Go back into Google Domains > DNS, and add the registered host
  27. Host Name: @, IPv4 address: [VPN IP], then click 'Add'
  28.  
  29. ---------------------------------------
  30. Install Caddy Server
  31. ---------------------------------------
  32. 1. Install Caddy from the download page
  33. 2. Choose Windows 64 bit, and make sure to select the tls.dns.cloudflare plugin as well
  34. 3. Then use the direct download link at the bottom of the page to grab the full custom package
  35. 4. Extract the downloaded zip file to: C:\caddy\
  36. 5. Goto localhost:2015 and confirm it doesn't load yet
  37. 6. Open cmd.exe, and start CaddyServer via commandline:
  38. cd c:\caddy
  39. caddy
  40. 7. Now recheck localhost:2015 and confirm it now says '404 Not Found'
  41. 8. Drop the Caddyfile, and common.conf file into the C:\caddy\ folder
  42.  
  43. ------------------------------------
  44. Install PHP
  45. ------------------------------------
  46. 1. Goto: http://windows.php.net/download/
  47. 2. Download the PHP 7.0, VC14 x64 Non Thread Safe version (zip file)
  48. 3. Create a folder called 'php' inside C:\caddy\
  49. 4. Extract the downloaded zip file to: C:\caddy\php\
  50.  
  51. ------------------------------------
  52. Configure CaddyServer
  53. ------------------------------------
  54. 1. Get the Global API key from cloudflare
  55. 2. Type in cmd.exe:
  56. setx CLOUDFLARE_EMAIL [EMAIL]
  57. setx CLOUDFLARE_API_KEY [API Key]
  58. 3. Re-open cmd.exe, and start CaddyServer via commandline:
  59. cd c:\caddy
  60. caddy
  61. 4. Reverse Proxy should be now running.
  62. 5. Exit out of the command prompt, and install Caddy as a Windows service.
  63.  
  64. -----------------------------------
  65. To run Caddy as a Windows service:
  66. -----------------------------------
  67. 1. Open command prompt as administrator
  68. 2. Type: nssm install Caddy
  69. 3. Path: c:\caddy\caddy.exe
  70. 4. Details tab, display name: Caddy
  71. 5. Log on tab, click 'This Account'
  72. This account: [User Account Name]
  73. Type in the computer password for that specific user account
  74. 6. Click 'Install Service'
  75. 7. In the admin command prompt, type: services.msc
  76. 8. Find Caddy, right click, and hit Start
  77. 9. Restart computer, and confirm Caddy starts up with Windows by trying the following:
  78.  
  79. https://[domain_name]:10443/emby
  80. https://[domain_name]:10443/sonarr
  81. https://[domain_name]:10443/couch
  82. https://[domain_name]:10443/nzbget
  83. https://[domain_name]:10443/deluge
Advertisement
RAW Paste Data Copied
Advertisement