Advertisement
Guest User

Untitled

a guest
Apr 1st, 2019
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.85 KB | None | 0 0
  1. Do you want to continue with Nginx vhost site creation ? [y/n] y
  2.  
  3. Enter vhost domain name to add (without www. prefix): domain.com
  4.  
  5. Create a self-signed SSL certificate Nginx vhost? [y/n]: n
  6. Get Letsencrypt SSL certificate Nginx vhost? [y/n]: y
  7.  
  8. ---------------------------------------------------------------
  9. To get Letsencrypt SSL certificate, you must already have updated intended
  10. domain vhost name's DNS A record to this server's IP addresss.
  11. If top level domain, DNS A record is needed also for www. version of domain
  12. otherwise, Letsencrypt domain name validation will fail.
  13. ---------------------------------------------------------------
  14. continue [y/n] ? y
  15.  
  16.  
  17. domain.com is a top level domain
  18. your server IPv4 IP address: 103.105.xxx
  19.  
  20. domain.com IPv4 DNS A record is behind Cloudflare IPs
  21. current DNS A record IPv4 address for domain.com is: 104.28.31.148 104.28.30.14 8
  22.  
  23. domain.com IPv6 DNS AAAA record is behind Cloudflare IPs
  24. current DNS AAAA record IPv6 address for domain.com is: 2606:4700:30::681c:1f94 2606:4700:30::681c:1e94
  25.  
  26. www.domain.com IPv4 DNS A record is behind Cloudflare IPs
  27. current DNS A record IP address for www.domain.com is: 104.28.31.148 104.28.30. 148
  28.  
  29. www.domain.com IPv6 DNS AAAA record is behind Cloudflare IPs
  30. current DNS AAAA record IPv6 address for www.domain.com is: 2606:4700:30::681c: 1e94 2606:4700:30::681c:1f94
  31.  
  32. Do you want to continue [y/n]: y
  33.  
  34. ------------------------------------------------
  35. You have 4 options:
  36. ------------------------------------------------
  37. 1. issue staging test cert with HTTP + HTTPS (untrusted)
  38. 2. issue staging test cert with HTTPS default (untrusted)
  39. 3. issue live cert with HTTP + HTTPS (trusted)
  40. 4. issue live cert with HTTPS default (trusted)
  41. Enter option number 1-4: 4
  42.  
  43.  
  44. Create FTP username for vhost domain (enter username): FTPUSER
  45. Auto generate FTP password (recommended) [y/n]: y
  46.  
  47. FTP username you entered: FTPUSER
  48. FTP password auto generated: &S)--d!;D%%4hi$U(y`(+
  49.  
  50. Password:
  51. Enter it again:
  52. ---------------------------------------------------------------
  53. SSL Vhost Setup...
  54. ---------------------------------------------------------------
  55.  
  56. --2019-04-01 07:17:12-- https://support.cloudflare.com/hc/en-us/article_attachm ents/201243967/origin-pull-ca.pem
  57. Resolving support.cloudflare.com... 104.16.52.111, 104.16.54.111, 104.16.51.111, ...
  58. Connecting to support.cloudflare.com|104.16.52.111|:443... connected.
  59. HTTP request sent, awaiting response... 200 OK
  60. Length: 2151 (2.1K) [application/x-x509-ca-cert]
  61. Saving to: ‘origin.crt’
  62.  
  63. 0K .. 100% 14.4M=0s
  64.  
  65. 2019-04-01 07:17:13 (14.4 MB/s) - ‘origin.crt’ saved [2151/2151]
  66.  
  67. ---------------------------------------------------------------
  68. Generating self signed SSL certificate...
  69. CSR file can also be used to be submitted for paid SSL certificates
  70. If using for paid SSL certificates be sure to keep both private key and CSR safe
  71. creating CSR File: domain.com.csr
  72. creating private key: domain.com.key
  73. creating self-signed SSL certificate: domain.com.crt
  74. Generating a 2048 bit RSA private key
  75. ...........................................................+++
  76. ....................................................+++
  77. writing new private key to 'domain.com.key'
  78. -----
  79. Signature ok
  80. subject=/C=US/ST=California/L=Los Angeles/O=domain.com/OU=domain.com/CN=domain x.com
  81. Getting Private key
  82.  
  83. ---------------------------------------------------------------
  84. Generating dhparam.pem file - can take a few minutes...
  85. Generating DH parameters, 2048 bit long safe prime, generator 2
  86. This is going to take a long time
  87. ...........+.................................................................... .............................+...........................+...............+...... ................................................................................ ....................................+........................................... ........................+....................................................... ..............+.....................+........................................... ....+..........+................................................................ ................................................................................ ........................+....................................................... ................................................................................ ................................................................................ .......+........................................................................ .......................+........................................................ ......................................+......................................... ...............................................................+..........+..... ..............................................+................................. ..............+..............................+.....................+............ ................................................................................ .............................................+...........................+...... ......................................................+..................+...... .........................................................+...................... ............+.........+......................................................... ...................+............................................................ .............................................+.................................. ................................................................................ ................................................................................ ...+...................+....................+.....................+............. ......................................+......................................... ................................................................................ ...............+..........................................+..................... ................................................................................ ...............................................+................+............... ................................................................................ ..........................................................................+..... ...................................................................+............ .........+...................................................................... ................................................................................ ................................................................................ ............+..................................................+................ ...........................................+.................................... ....+........................................................................... ...........................................................+.................... ...........+..................................+................................. ...................................................................+............ ................................................................................ .....................................................+......................+... ..................................+............+......+......................... ................................................................................ .................+..............................+............................... ................................................................................ ................................................................................ ................................................................................ ................................+............................................... .............................+...........+...................................... ....................................................+........................... ...............+.........................................................+...... ................................................................................ ................................................................................ ..............................................+................................. +.......................................+....................................... .......+.................+....................................+................. .....+................................................................+......... ..........................................................+..................... ................................................................................ ................................................................................ ................................................................................ .............+.................................................................. ......+.......................................+................................. ................................................................................ ................................................................................ ................................................................................ ......+............................................................+...........+ ................................................................................ ................................................................................ ................................................................................ ..............................................................................+. ................................................................................ ................................................................................ ................................................................................ ..............................................................+................. ................................................................................ ................................................................................ ........................................................+....................... .............................+.................................................. .........................................................................+...... ................................................................................ ................................................................................ ................................................................................ ................................................................+............... ...............................................+................................ ................................+.........+..................................+.. ................................................................................ ................................................................................ ......................++*++*
  88. dhparam file generation time: 61.647358359
  89. grep: /svr-setup/openssl-1.1.1b/configdata.pm: No such file or directory
  90.  
  91. -------------------------------------------------------------
  92. generated nginx include file [initial]: /usr/local/nginx/conf/autoprotect/demodo main.com/autoprotect-demodomain.com.conf
  93. generated nginx include file [initial]: /usr/local/nginx/conf/autoprotect/domain x.com/autoprotect-domain.com.conf
  94.  
  95. autoprotect.sh run completed...
  96.  
  97. Reloading nginx configuration (via systemctl): [ OK ]
  98. service nginx reload
  99. Reloading nginx configuration (via systemctl): [ OK ]
  100. systemctl restart pure-ftpd.service
  101.  
  102. -------------------------------------------------------------
  103. ok: /usr/local/src/centminmod/addons/acmetool.sh
  104. /usr/local/src/centminmod/addons/acmetool.sh issue domain.com lived
  105.  
  106. -------------------------------------------------
  107. acmetool.sh is in beta testing phase
  108. please read & provide bug reports &
  109. feedback for this tool via the forums
  110. https://centminmod.com/acmetool
  111. -------------------------------------------------
  112.  
  113. continue [y/n] ? y
  114.  
  115. -----------------------------------------------------
  116. updating acme.sh client...
  117. -----------------------------------------------------
  118. Cloning into 'acme.sh'...
  119. [Mon Apr 1 07:18:35 UTC 2019] It is recommended to install socat first.
  120. [Mon Apr 1 07:18:35 UTC 2019] We use socat for standalone server if you use sta ndalone mode.
  121. [Mon Apr 1 07:18:35 UTC 2019] If you don't use standalone mode, just ignore thi s warning.
  122. [Mon Apr 1 07:18:35 UTC 2019] Installing to /root/.acme.sh
  123. [Mon Apr 1 07:18:35 UTC 2019] Installed to /root/.acme.sh/acme.sh
  124. [Mon Apr 1 07:18:35 UTC 2019] Installing alias to '/root/.bashrc'
  125. [Mon Apr 1 07:18:35 UTC 2019] OK, Close and reopen your terminal to start using acme.sh
  126. [Mon Apr 1 07:18:35 UTC 2019] Installing alias to '/root/.cshrc'
  127. [Mon Apr 1 07:18:35 UTC 2019] Installing alias to '/root/.tcshrc'
  128. [Mon Apr 1 07:18:36 UTC 2019] Installing cron job
  129. [Mon Apr 1 07:18:36 UTC 2019] Good, bash is found, so change the shebang to use bash as preferred.
  130. [Mon Apr 1 07:18:37 UTC 2019] OK
  131. https://github.com/Neilpang/acme.sh
  132. v2.8.1
  133. -----------------------------------------------------
  134. acme.sh updated
  135. -----------------------------------------------------
  136. backup & remove /usr/local/nginx/conf/conf.d/domain.com.conf
  137.  
  138. [self-signed ssl cert check] required by acmetool.sh
  139.  
  140. [self-signed ssl] /usr/local/nginx/conf/ssl/domain.com/dhparam.pem exists
  141. [self-signed ssl] /usr/local/nginx/conf/ssl/domain.com/domain.com.crt exists
  142. [self-signed ssl] /usr/local/nginx/conf/ssl/domain.com/domain.com.key exists
  143.  
  144. [sslvhostsetup] create /usr/local/nginx/conf/conf.d/domain.com.ssl.conf
  145.  
  146. [non-wp] backup & remove /usr/local/nginx/conf/conf.d/domain.com.conf
  147. cat /usr/local/nginx/conf/ssl/domain.com/domain.com.crt.key.conf
  148. ssl_dhparam /usr/local/nginx/conf/ssl/domain.com/dhparam.pem;
  149. ssl_certificate /usr/local/nginx/conf/ssl/domain.com/domain.com.crt;
  150. ssl_certificate_key /usr/local/nginx/conf/ssl/domain.com/domain.com.key;
  151. #ssl_trusted_certificate /usr/local/nginx/conf/ssl/domain.com/domain.com-tru sted.crt;
  152. cp -a /usr/local/nginx/conf/conf.d/domain.com.ssl.conf /usr/local/nginx/conf/co nf.d/domain.com.ssl.conf-nonwp2
  153. cat /usr/local/nginx/conf/conf.d/domain.com.ssl.conf-nonwp1 /usr/local/nginx/co nf/conf.d/domain.com.ssl.conf-nonwp2 > /usr/local/nginx/conf/conf.d/domain.com .ssl.conf
  154. Reloading nginx configuration (via systemctl): [ OK ]
  155.  
  156. setting HTTPS default in /usr/local/nginx/conf/conf.d/domain.com.ssl.conf
  157.  
  158. sed -i 's|^##x# HTTPS-DEFAULT|#x# HTTPS-DEFAULT|g' "/usr/local/nginx/conf/conf.d /domain.com.ssl.conf"
  159. sed -i "s|#x# server {| server {|" "/usr/local/nginx/conf/conf.d/domain.com.ssl .conf"
  160. sed -i "s|#x# | |" "/usr/local/nginx/conf/conf.d/domain.com.ssl.conf"
  161. sed -i "s|#x# server_name domain.com www.domain.com;| server_name FTPUSER. com www.domain.com;|" "/usr/local/nginx/conf/conf.d/domain.com.ssl.conf"
  162. sed -i "s|#x# return 302 https://domain.com$request_uri;| return 302 https: //domain.com$request_uri;|" "/usr/local/nginx/conf/conf.d/domain.com.ssl.conf"
  163. sed -i "s|#x# include \/usr\/local\/nginx\/conf\/staticfiles.conf;| include \/usr\/local\/nginx\/conf\/staticfiles.conf;|" "/usr/local/nginx/conf/conf.d/wai fu2x.com.ssl.conf"
  164. sed -i "s|#x# }| }|" "/usr/local/nginx/conf/conf.d/domain.com.ssl.conf"
  165.  
  166. remove /usr/local/nginx/conf/conf.d/domain.com.conf
  167.  
  168. grep 'root' /usr/local/nginx/conf/conf.d/domain.com.ssl.conf
  169. root /home/nginx/domains/domain.com/public;
  170.  
  171. -----------------------------------------------------------
  172. issue & install letsencrypt ssl certificate for domain.com
  173. -----------------------------------------------------------
  174. testcert value = lived
  175. /root/.acme.sh/acme.sh --issue -d domain.com -d www.domain.com --days 60 -w /h ome/nginx/domains/domain.com/public -k ec-256 --useragent centminmod-centos7-ac mesh-webroot --log /root/centminlogs/acmetool.sh-debug-log-010419-071829.log --l og-level 2
  176. [Mon Apr 1 07:18:39 UTC 2019] Registering account
  177. [Mon Apr 1 07:18:41 UTC 2019] Registered
  178. [Mon Apr 1 07:18:41 UTC 2019] ACCOUNT_THUMBPRINT='99lqBwMq4_D2bcrdVD5XT5z-oAAJm 60SArQZ0pim45Y'
  179. [Mon Apr 1 07:18:41 UTC 2019] Creating domain key
  180. [Mon Apr 1 07:18:41 UTC 2019] The domain key is here: /root/.acme.sh/FTPUSER.co m_ecc/domain.com.key
  181. [Mon Apr 1 07:18:41 UTC 2019] Multi domain='DNS:domain.com,DNS:www.domain.com '
  182. [Mon Apr 1 07:18:41 UTC 2019] Getting domain auth token for each domain
  183. [Mon Apr 1 07:18:43 UTC 2019] Getting webroot for domain='domain.com'
  184. [Mon Apr 1 07:18:43 UTC 2019] Getting webroot for domain='www.domain.com'
  185. [Mon Apr 1 07:18:43 UTC 2019] Verifying: domain.com
  186. [Mon Apr 1 07:18:46 UTC 2019] Pending
  187. [Mon Apr 1 07:18:49 UTC 2019] domain.com:Verify error:Fetching https://FTPUSER .com/.well-known/acme-challenge/jH-QJN9Yeb9TgIxy2HwBBUDfY1YlU16vBt132IHnO9g: Too many redirects
  188. [Mon Apr 1 07:18:49 UTC 2019] Please check log file for more details: /root/cen tminlogs/acmetool.sh-debug-log-010419-071829.log
  189. LECHECK = 1
  190.  
  191. log files saved at /root/centminlogs
  192. -rw-r--r--. 1 root root 67K Apr 1 07:18 acmetool.sh-debug-log-010419-071829.lo g
  193. -rw-r--r--. 1 root root 5.0K Apr 1 07:18 acmesh-issue_010419-071829.log
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement