{"id":37214,"date":"2020-02-23T20:09:45","date_gmt":"2020-02-23T12:09:45","guid":{"rendered":"http:\/\/4563.org\/?p=37214"},"modified":"2020-02-23T20:09:45","modified_gmt":"2020-02-23T12:09:45","slug":"virmach-%e8%8a%9d%e5%8a%a0%e5%93%a5-6-22-%e8%a3%85%e6%9c%ba-debian-acme-nginx","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=37214","title":{"rendered":"Virmach \u829d\u52a0\u54e5 $6.22 \u88c5\u673a Debian ACME Nginx"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>zxxx<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-10 07:17:41\t<\/p>\n<h3>Virmach \u829d\u52a0\u54e5 $6.22 \u88c5\u673a Debian ACME Nginx<\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 zxxx \u4e8e 2019-12-12 22:40 \u7f16\u8f91 <\/p>\n<p> 1\u3001\u8fdb\u5165\u540e\u53f0\uff0c\u9009\u62e9\u5bf9\u5e94\u7684\u670d\u52a1<br \/>  https:\/\/i.loli.net\/2019\/12\/10\/TmzsBNoXbVrtJWS.jpg<\/p>\n<p>  2\u3001\u9009\u62e9 Control Panel<br \/>  https:\/\/i.loli.net\/2019\/12\/10\/OkYlNMpfxQDFHoA.jpg<\/p>\n<p>  3\u3001\u9009\u62e9 Manage<br \/>  https:\/\/i.loli.net\/2019\/12\/10\/JWYLaqSw7d4DxXR.jpg<\/p>\n<p>  4\u3001\u9009\u62e9 Reinstall<br \/>  https:\/\/i.loli.net\/2019\/12\/10\/kpdErb5wfRuzBYa.jpg<\/p>\n<p>  5\u3001\u9009\u62e9 Debian 9 64bit Minimal<br \/>  https:\/\/i.loli.net\/2019\/12\/10\/U6Sc7vhlNMXD1Hd.jpg<\/p>\n<p>  6\u3001\u8bb0\u4f4f\u5bc6\u7801<br \/>  https:\/\/i.loli.net\/2019\/12\/10\/7TuFb5oylwYCfZd.jpg<\/p>\n<p>  7\u3001\u7136\u540e\u901a\u8fc7SSH\u8fde\u63a5VPS<br \/>  Linux QuietEvergreen-VM 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23) x86_64<\/p>\n<p>  The programs included with the Debian GNU\/Linux system are free software;<br \/>  the exact distribution terms for each program are described in the<br \/>  individual files in \/usr\/share\/doc\/*\/copyright.<\/p>\n<p>  Debian GNU\/Linux comes with ABSOLUTELY NO WARRANTY, to the extent<br \/>  permitted by applicable law.<\/p>\n<p>  8\u3001\u4f7f\u7528 passwd \u547d\u4ee4\u4fee\u6539\u5bc6\u7801\uff0c\u8f93\u5165\u4e24\u904d\u5bc6\u7801<br \/>  root@QuietEvergreen-VM:~# passwd<br \/>  Enter new UNIX password: <br \/>  Retype new UNIX password: <br \/>  passwd: password updated successfully<\/p>\n<p>  9\u3001\u5b89\u88c5 Screen<br \/>  apt install screen<br \/>  The following NEW packages will be installed:<br \/>  screen<br \/>  0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.<\/p>\n<p>  10\u3001\u542f\u52a8 Screen<br \/>  screen -S s<\/p>\n<p>  11\u3001\u751f\u6210 RSA \u5bc6\u94a5\u5bf9<br \/>  root@QuietEvergreen-VM:~# ssh-keygen -t rsa -b 4096<br \/>  Generating public\/private rsa key pair.<br \/>  Enter file in which to save the key (\/root\/.ssh\/id_rsa): <br \/>  Created directory &#8216;\/root\/.ssh&#8217;.<br \/>  Enter passphrase (empty for no passphrase): <br \/>  Enter same passphrase again: <br \/>  Your identification has been saved in \/root\/.ssh\/id_rsa.<br \/>  Your public key has been saved in \/root\/.ssh\/id_rsa.pub.<br \/>  The key fingerprint is:<br \/>  SHA256:NeqEoukPQ2qi6UBq5XITvzkt3P5iKDLlnsOncgCONWg root@QuietEvergreen-VM<br \/>  The key&#8217;s randomart image is:<br \/>  +&#8212;&#8212;-+<br \/>  |&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;|<br \/>  |&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;|<br \/>  | .&nbsp; &nbsp;&nbsp; &nbsp;o&nbsp; &nbsp;&nbsp; &nbsp;|<br \/>  |oEo&nbsp; &nbsp; . o .&nbsp; &nbsp;|<br \/>  |=o.+. . S&nbsp; &nbsp;&nbsp; &nbsp;|<br \/>  |+=o+o. o&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;|<br \/>  |=+X+..+ .&nbsp; &nbsp;&nbsp; &nbsp;|<br \/>  |**oOo*o=&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;|<br \/>  |+.B=*o=.o.&nbsp; &nbsp;&nbsp; &nbsp; |<br \/>  +&#8212;&#8212;&#8212;+<\/p>\n<p>  11\u3001\u65b0\u5efa\u6587\u4ef6\u5939 Z:.ssh \u3010\u8f93\u5165 .ssh. \u3011<\/p>\n<p>  12\u3001\u901a\u8fc7 SFTP \u8fde\u63a5VPS\uff0c\u4e0b\u8f7d\u5bc6\u94a5\u5bf9<br \/>  sftp&gt; get ~\/.ssh\/* <br \/>  Downloading id_rsa from \/root\/.ssh\/id_rsa<br \/>  100% 3KB&nbsp; &nbsp;&nbsp; &nbsp;3KB\/s 00:00:01&nbsp; &nbsp;<br \/>  \/root\/.ssh\/id_rsa: 3243 bytes transferred in 1 seconds (3243 bytes\/s)<br \/>  Downloading id_rsa.pub from \/root\/.ssh\/id_rsa.pub<br \/>  100% 748 bytes&nbsp; &nbsp; 748 bytes\/s 00:00:01&nbsp; &nbsp;<br \/>  \/root\/.ssh\/id_rsa.pub: 748 bytes transferred in 1 seconds (748 bytes\/s)<\/p>\n<p>  13\u3001\u5220\u9664\u5bc6\u94a5\u5bf9<br \/>  root@QuietEvergreen-VM:~# rm ~\/.ssh\/id_rsa*<\/p>\n<p>  14\u3001\u4f7f\u7528 PuTTY Key Generator \u8f6c\u6362\u79c1\u94a5\u6dfb\u52a0\u53e3\u4ee4\uff0c\u4fdd\u5b58 authorized_keys<\/p>\n<p>  \u9009\u62e9\u5168\u90e8\u5e76\u590d\u5236\uff0c\u65b0\u5efa\u6587\u4ef6\u7c98\u8d34\u540e\u53e6\u5b58\u4e3a authorized_keys<\/p>\n<p>  15\u3001\u65b0\u5efa\u6587\u4ef6 authorized_keys \u4fee\u6539 sshd_config \u6587\u4ef6\u5e76\u68c0\u67e5<\/p>\n<p>  root@QuietEvergreen-VM:~# cat &lt;&lt; &quot;EOF&quot; &gt; \/root\/.ssh\/authorized_keys<br \/>  ssh-rsa AAAAB3NzaC1yc2EAA&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.QZ3WIHkbtIaQ==<br \/>  EOF<\/p>\n<p>  root@QuietEvergreen-VM:~# cat &lt;&lt; &quot;EOF&quot; &gt; \/etc\/ssh\/sshd_config<br \/>  &gt; AcceptEnv LANG LC_*<br \/>  &gt; ChallengeResponseAuthentication no<br \/>  &gt; PasswordAuthentication no<br \/>  &gt; PermitRootLogin yes<br \/>  &gt; Port 22<br \/>  &gt; PrintMotd no<br \/>  &gt; PubkeyAuthentication yes<br \/>  &gt; Subsystem sftp \/usr\/lib\/openssh\/sftp-server<br \/>  &gt; UsePAM yes<br \/>  &gt; X11Forwarding yes<br \/>  &gt; EOF<br \/>  root@QuietEvergreen-VM:~# sshd -t<\/p>\n<p>  16\u3001\u91cd\u65b0\u542f\u52a8 SSH \u670d\u52a1<br \/>  systemctl restart sshd<\/p>\n<p>  17\u3001\u4f7f\u7528SSH\u5bc6\u94a5\u767b\u5f55\u8fde\u63a5 VPS<br \/>  Linux QuietEvergreen-VM 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23) x86_64<\/p>\n<p>  The programs included with the Debian GNU\/Linux system are free software;<br \/>  the exact distribution terms for each program are described in the<br \/>  individual files in \/usr\/share\/doc\/*\/copyright.<\/p>\n<p>  Debian GNU\/Linux comes with ABSOLUTELY NO WARRANTY, to the extent<br \/>  permitted by applicable law.<br \/>  root@QuietEvergreen-VM:~#  <\/p>\n<p>  18\u3001\u5347\u7ea7\u7cfb\u7edf<br \/>  screen -S s<\/p>\n<p>  apt update &amp;&amp; <br \/>  apt upgrade &amp;&amp; <br \/>  apt full-upgrade &amp;&amp; <br \/>  apt autoremove &amp;&amp; <br \/>  apt autoclean<\/p>\n<p>  19\u3001\u5347\u7ea7\u5230 Debian 10<\/p>\n<p>  sed -i &#8216;s\/stretch\/buster\/g&#8217; \/etc\/apt\/sources.list &amp;&amp; <br \/>  apt update &amp;&amp; <br \/>  apt upgrade &amp;&amp; <br \/>  apt full-upgrade &amp;&amp; <br \/>  apt autoremove &amp;&amp; <br \/>  apt autoclean<\/p>\n<p>  20\u3001\u4f7f\u7528\u65b0\u5185\u6838\u542f\u52a8<br \/>  systemctl reboot<\/p>\n<p>  21\u3001\u79fb\u9664\u65e7\u5185\u6838<br \/>  root@QuietEvergreen-VM:~# screen -S s<br \/>  root@QuietEvergreen-VM:~# dpkg &#8211;get-selections | grep linux<br \/>  console-setup-linux&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;install<br \/>  firmware-linux-free&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;install<br \/>  libselinux1:amd64&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; install<br \/>  linux-base&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;install<br \/>  linux-image-4.19.0-6-amd64&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; install<br \/>  linux-image-4.9.0-11-amd64&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; install<br \/>  linux-image-4.9.0-4-amd64&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;install<br \/>  linux-image-amd64&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; install<br \/>  util-linux&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;install<br \/>  util-linux-locales&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;install<\/p>\n<p>  root@QuietEvergreen-VM:~# apt autoremove &#8211;purge linux-image-4.9.0-4-amd64 linux-image-4.9.0-11-amd64<br \/>  Reading package lists&#8230; Done<\/p>\n<p>  root@QuietEvergreen-VM:~# dpkg &#8211;get-selections | grep linux<br \/>  console-setup-linux&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;install<br \/>  firmware-linux-free&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;install<br \/>  libselinux1:amd64&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; install<br \/>  linux-base&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;install<br \/>  linux-image-4.19.0-6-amd64&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; install<br \/>  linux-image-amd64&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; install<br \/>  util-linux&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;install<br \/>  util-linux-locales&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;install<\/p>\n<p>  22\u3001\u66f4\u65b0 grub<br \/>  root@QuietEvergreen-VM:~# update-grub<br \/>  Generating grub configuration file &#8230;<br \/>  Found linux image: \/boot\/vmlinuz-4.19.0-6-amd64<br \/>  Found initrd image: \/boot\/initrd.img-4.19.0-6-amd64<br \/>  done<\/p>\n<p>  23\u3001\u5f00\u542f BBR<br \/>  root@QuietEvergreen-VM:~# echo &quot;net.core.default_qdisc=fq&quot; &gt;&gt; \/etc\/sysctl.conf &amp;&amp; <br \/>  &gt; echo &quot;net.ipv4.tcp_congestion_control=bbr&quot; &gt;&gt; \/etc\/sysctl.conf &amp;&amp; <br \/>  &gt; sysctl -p &amp;&amp; <br \/>  &gt; lsmod |grep bbr<br \/>  net.core.default_qdisc = fq<br \/>  net.ipv4.tcp_congestion_control = bbr<br \/>  tcp_bbr&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 204801<br \/>  root@QuietEvergreen-VM:~# <\/p>\n<p>  24\u3001\u5b89\u88c5 acme.sh<br \/>  root@QuietEvergreen-VM:~# apt install curl<br \/>  root@QuietEvergreen-VM:~# curl https:\/\/get.acme.sh | sh<br \/>   Install success!<br \/>  root@QuietEvergreen-VM:~# echo &#8216;alias acme.sh=~\/.acme.sh\/acme.sh&#8217; &gt;&gt; \/etc\/profile<br \/>  root@QuietEvergreen-VM:~# source \/etc\/profile<br \/>  root@QuietEvergreen-VM:~# acme.sh &#8211;upgrade &#8211;auto-upgrade<br \/>   Install success!<br \/>   Upgrade success!<br \/>  root@QuietEvergreen-VM:~# <\/p>\n<p>  25\u3001\u7b7e\u53d1\u8bc1\u4e66 \u3010\u4f7f\u7528 cloudflare\u3011<br \/>  export CF_Email=cloudflare@gmail.com<br \/>  export CF_Key=d2d833bd132a12a5de698b64ec5e4c91d8da6<br \/>  acme.sh &#8211;issue -d domain.com -d *.domain.com &#8211;dns dns_cf<\/p>\n<p>  26\u3001\u5b89\u88c5\u8bc1\u4e66<br \/>  mkdir -p \/etc\/nginx\/ssl\/domain.com &amp;&amp; <br \/>  ~\/.acme.sh\/acme.sh &#8211;install-cert -d domain.com <br \/>  &#8211;cert-file \/etc\/nginx\/ssl\/domain.com\/domain.com.cer <br \/>  &#8211;ca-file \/etc\/nginx\/ssl\/domain.com\/ca.cer <br \/>  &#8211;key-file \/etc\/nginx\/ssl\/domain.com\/domain.com.key <br \/>  &#8211;fullchain-file \/etc\/nginx\/ssl\/domain.com\/fullchain.cer <br \/>  &#8211;reloadcmd &quot;service nginx force-reload&quot;<\/p>\n<p>   Installing cert to:\/etc\/nginx\/ssl\/domain.com\/domain.com.cer<br \/>   Installing CA to:\/etc\/nginx\/ssl\/domain.com\/ca.cer<br \/>   Installing key to:\/etc\/nginx\/ssl\/domain.com\/domain.com.key<br \/>   Installing full chain to:\/etc\/nginx\/ssl\/domain.com\/fullchain.cer<br \/>   Run reload cmd: service nginx force-reload<br \/>  Failed to restart nginx.service: Unit nginx.service not found.<br \/>   Reload error for :<\/p>\n<p>  27\u3001\u5b89\u88c5 Nginx<br \/>  root@QuietEvergreen-VM:~# apt install nginx<br \/>  The following NEW packages will be installed:<br \/>  nginx nginx-common nginx-full<br \/>  0 upgraded, 23 newly installed, 0 to remove and 0 not upgraded.<br \/>  Need to get 4,559 kB of archives.<br \/>  After this operation, 10.1 MB of additional disk space will be used.<br \/>  Do you want to continue?  <\/p>\n<p>  28\u3001\u914d\u7f6e Nginx<\/p>\n<p>  \u62b1\u6b49\uff0c\u60a8\u7684\u5e16\u5b50\u8d85\u8fc7 10000 \u4e2a\u5b57\u7b26\u7684\u9650\u5236<br \/>  [ \u70b9\u51fb\u8fd9\u91cc\u8fd4\u56de\u4e0a\u4e00\u9875 ]   \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>zxxx<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-10 07:18:08\t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 zxxx \u4e8e 2019-12-10 21:49 \u7f16\u8f91 <\/p>\n<p> 27\u3001\u5b89\u88c5 Nginx<br \/>  root@QuietEvergreen-VM:~# apt install nginx<br \/>  The following NEW packages will be installed:<br \/>  nginx nginx-common nginx-full<\/p>\n<p>  root@QuietEvergreen-VM:~# nginx -t<br \/>  nginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok<br \/>  nginx: configuration file \/etc\/nginx\/nginx.conf test is successful<\/p>\n<p>  root@QuietEvergreen-VM:~# systemctl status nginx<br \/>  \u25cf nginx.service &#8211; A high performance web server and a reverse proxy server<br \/>  &nbsp; &nbsp;Loaded: loaded (\/lib\/systemd\/system\/nginx.service; enabled; vendor preset: enabled)<br \/>  &nbsp; &nbsp;Active: active (running) since Mon 2019-12-09 19:05:09 EST; 18s ago<br \/>  &nbsp; &nbsp;Docs: man:nginx(8)<br \/>   Main PID: 5233 (nginx)<br \/>  &nbsp; &nbsp; Tasks: 2 (limit: 847)<br \/>  &nbsp; &nbsp;Memory: 7.9M<br \/>  &nbsp; &nbsp;CGroup: \/system.slice\/nginx.service<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;\u251c\u25005233 nginx: master process \/usr\/sbin\/nginx -g daemon on; master_process on;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;\u2514\u25005234 nginx: worker process<\/p>\n<p>  Dec 09 19:05:09 QuietEvergreen-VM systemd: Starting A high performance web server and a reverse proxy<br \/>  Dec 09 19:05:09 QuietEvergreen-VM systemd: nginx.service: Failed to parse PID from file \/run\/nginx.pid<br \/>  Dec 09 19:05:09 QuietEvergreen-VM systemd: Started A high performance web server and a reverse proxy <br \/>  root@QuietEvergreen-VM:~# <\/p>\n<p>  \u9ed8\u8ba4\u914d\u7f6e\u6587\u4ef6 \/etc\/nginx\/nginx.conf \u6d4b\u8bd5\u901a\u8fc7\uff0c\u73b0\u5728\u53ef\u4ee5\u901a\u8fc7 IP \u6d4f\u89c8\u4e3b\u9875\u3002<\/p>\n<p>  https:\/\/i.loli.net\/2019\/12\/10\/l3xqdoDrCAPJHzO.jpg<\/p>\n<p>  \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>zxxx<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-10 07:19:19\t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 zxxx \u4e8e 2019-12-11 22:37 \u7f16\u8f91 <\/p>\n<p> 28\u3001\u914d\u7f6e Nginx<\/p>\n<p>  mkdir -p \/var\/www\/domain.com<\/p>\n<p>  cat &lt;&lt; &quot;EOF&quot; &gt; \/var\/www\/domain.com\/index.html<br \/>  &lt;!DOCTYPE html&gt;<br \/>  &lt;html&gt;<br \/>  &lt;head&gt;<br \/>  &lt;title&gt;Welcome to nginx!&lt;\/title&gt;<br \/>  &lt;style&gt;<br \/>  &nbsp; &nbsp; body {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;width: 35em;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;margin: 0 auto;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;font-family: Tahoma, Verdana, Arial, sans-serif;<br \/>  &nbsp; &nbsp; }<br \/>  &lt;\/style&gt;<br \/>  &lt;\/head&gt;<br \/>  &lt;body&gt;<br \/>  &lt;h1&gt;Welcome to nginx!&lt;\/h1&gt;<br \/>  &lt;p&gt;If you see this page, the nginx web server is successfully installed and<br \/>  working. Further configuration is required.&lt;\/p&gt;<br \/>  &lt;p&gt;For online documentation and support please refer to<br \/>  &lt;a &gt;nginx.org&lt;\/a&gt;.&lt;br\/&gt;<br \/>  Commercial support is available at<br \/>  &lt;a &gt;nginx.com&lt;\/a&gt;.&lt;\/p&gt;<br \/>  &lt;p&gt;&lt;em&gt;Thank you for using nginx.&lt;\/em&gt;&lt;\/p&gt;<br \/>  &lt;\/body&gt;<br \/>  &lt;\/html&gt;<br \/>  EOF<\/p>\n<p>  cat &lt;&lt; &quot;EOF&quot; &gt; \/etc\/nginx\/nginx.conf<br \/>  user www-data www-data;<br \/>  worker_processes auto;<br \/>  worker_rlimit_nofile 65535;<br \/>  events {<br \/>  multi_accept on;<br \/>  worker_connections 4096;<br \/>  }<br \/>  http {<br \/>  include mime.types;<br \/>  default_type application\/octet-stream;<br \/>  charset utf-8;<br \/>  client_header_buffer_size 32k;<br \/>  client_max_body_size 128M;<br \/>  keepalive_timeout 60;<br \/>  large_client_header_buffers 4 32k;<br \/>  log_not_found off;<br \/>  sendfile on;<br \/>  sendfile_max_chunk 512k;<br \/>  server_names_hash_bucket_size 128;<br \/>  server_tokens off;<br \/>  tcp_nodelay on;<br \/>  tcp_nopush on;<br \/>  types_hash_max_size 2048;<br \/>  gzip on;<br \/>  gzip_min_length 1k;<br \/>  gzip_buffers 4 16k;<br \/>  gzip_http_version 1.1;<br \/>  gzip_comp_level 6;<br \/>  gzip_types text\/plain text\/xml text\/javascript text\/css application\/javascript application\/x-javascript application\/json application\/xml application\/xml+rss application\/atom+xml image\/svg+xml;<br \/>  gzip_vary on;<br \/>  gzip_proxied expired no-cache no-store private auth;<br \/>  gzip_disable &quot;MSIE .&quot;;<br \/>  fastcgi_intercept_errors on;<br \/>  proxy_intercept_errors on;<br \/>  recursive_error_pages on;<br \/>  error_log \/var\/log\/nginx\/error.log crit;<br \/>  log_format main<br \/>  &#8216;$remote_addr &#8211; $remote_user [$time_local] &quot;$request&quot; $status $body_bytes_sent &quot;$http_referer&quot; &quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;&#8217;;<br \/>  access_log on;<br \/>  access_log \/var\/log\/nginx\/access.log main;<br \/>  limit_req_log_level warn;<br \/>  limit_req_zone $binary_remote_addr zone=login:10m rate=10r\/m;<br \/>  ssl_buffer_size 16k;<br \/>  ssl_session_cache shared:SSL:10m;<br \/>  ssl_session_timeout 1d;<br \/>  ssl_session_tickets off;<br \/>  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;<br \/>  ssl_prefer_server_ciphers on;<br \/>  ssl_ciphers &quot;TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5&quot;;<br \/>  ssl_stapling on;<br \/>  ssl_stapling_verify on;<br \/>  resolver 8.8.8.8 8.8.4.4 208.67.222.222 208.67.220.220 valid=60s;<br \/>  resolver_timeout 2s;<br \/>  add_header Strict-Transport-Security &quot;max-age=31536000; includeSubDomains; preload&quot; always;<br \/>  add_header Content-Security-Policy &quot;default-src &#8216;self&#8217; http: https: data: blob: &#8216;unsafe-inline&#8217;&quot; always;<br \/>  add_header Referrer-Policy &quot;no-referrer-when-downgrade&quot; always;<br \/>  add_header X-Content-Type-Options &quot;nosniff&quot; always;<br \/>  add_header X-Frame-Options &quot;SAMEORIGIN&quot; always;<br \/>  add_header X-XSS-Protection &quot;1; mode=block&quot; always;<br \/>  ssl_dhparam \/etc\/nginx\/ssl\/domain.com\/dhparam.pem;<br \/>  ssl_certificate \/etc\/nginx\/ssl\/domain.com\/fullchain.cer;<br \/>  ssl_certificate_key \/etc\/nginx\/ssl\/domain.com\/domain.com.key;<br \/>  proxy_buffering on;<br \/>  proxy_buffers&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;32 8k;<br \/>  proxy_connect_timeout&nbsp; &nbsp;90;<br \/>  proxy_send_timeout&nbsp; &nbsp;&nbsp; &nbsp;90;<br \/>  proxy_read_timeout&nbsp; &nbsp;&nbsp; &nbsp;90;<br \/>  server {<br \/>  &nbsp; &nbsp; listen 80 default_server;<br \/>  &nbsp; &nbsp; listen [::]:80 default_server;<br \/>  &nbsp; &nbsp; access_log off;<br \/>  &nbsp; &nbsp; error_log off;<br \/>  &nbsp; &nbsp; server_name _;<br \/>  &nbsp; &nbsp; return 301 https:\/\/www.domain.com$request_uri;<br \/>  }<br \/>  server {<br \/>  &nbsp; &nbsp; listen 443 ssl http2;<br \/>  &nbsp; &nbsp; listen [::]:443 ssl http2;<br \/>  &nbsp; &nbsp; server_name domain.com;<br \/>  &nbsp; &nbsp; return 301 https:\/\/www.domain.com$request_uri;<br \/>  }<br \/>  server {<br \/>  &nbsp; &nbsp; listen 443 ssl http2;<br \/>  &nbsp; &nbsp; listen [::]:443 ssl http2;<br \/>  &nbsp; &nbsp; server_name www.domain.com;<br \/>  &nbsp; &nbsp; root \/var\/www\/domain.com;<br \/>  &nbsp; &nbsp; index index.htm index.html index.php;<br \/>  &nbsp; &nbsp; location ~ \/.(?!well-known) {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;deny all;<br \/>  &nbsp; &nbsp; }<br \/>  &nbsp; &nbsp; location \/ws {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;proxy_redirect off;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;proxy_pass http:\/\/127.0.0.1:12345;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;proxy_http_version 1.1;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;proxy_intercept_errors on;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;proxy_set_header Upgrade $http_upgrade;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;proxy_set_header Connection &quot;upgrade&quot;;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;proxy_set_header Host $http_host;<br \/>  &nbsp; &nbsp; }<br \/>  &nbsp; &nbsp; location \/ {<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;try_files $uri $uri\/ =404;<br \/>  &nbsp; &nbsp; }<br \/>  }<br \/>  }<br \/>  EOF<\/p>\n<p>  nginx -t<br \/>  nginx -s reload\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u70ed\u5fc3\u5e02\u6c11<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-10 07:20:56\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u9876\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>iwil<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-10 07:22:51\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u697c\u4e3b\u70ed\u5fc3\u4eba\uff01\u8c22\u8c22\u4f60\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u79d8\u5bc6<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-10 07:42:37\t<\/p>\n<p>  \t\t\t\t\t<strong>\u84dd\u7fd4\u6280\u6821<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-10 07:44:03\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u524d\u6392\u51fa\u552e\uff0c\u5e7f\u544a\u9ec4\u91d1\u4f4d\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>Kasumi<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-10 07:45:34\t<\/p>\n<p>  \t\t\t\t\t<strong>yem<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-10 07:52:06\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u9876\u5927\u4f6c\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>dengdaibingning<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-10 07:57:05\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u652f\u6301\u697c\u4e3b\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>zxxx \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/37214"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=37214"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/37214\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=37214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=37214"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=37214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}