{"id":15557,"date":"2026-01-27T15:14:13","date_gmt":"2026-01-27T07:14:13","guid":{"rendered":"https:\/\/blog.pfchina.org\/?p=15557"},"modified":"2026-03-23T10:05:04","modified_gmt":"2026-03-23T02:05:04","slug":"vps-%e5%8f%8d%e5%90%91%e4%bb%a3%e7%90%86%e6%9c%ac%e5%9c%b0%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%88%b0%e5%85%ac%e7%bd%91%ef%bc%88tailscale-%e6%96%b9%e6%a1%88%ef%bc%89","status":"publish","type":"post","link":"https:\/\/blog.pfchina.org\/?p=15557","title":{"rendered":"\u53cd\u5411\u4ee3\u7406\u672c\u5730\u670d\u52a1\u5668\u5230\u516c\u7f51"},"content":{"rendered":"<p style=\"text-align: justify;\">\u5728\u5bb6\u5ead\u7f51\u7edc\u73af\u5883\u4e2d\uff0c\u5982\u679c\u6ca1\u6709\u516c\u7f51 IP\uff0c\u4f46\u53c8\u60f3\u5bf9\u5916\u53d1\u5e03\u670d\u52a1\uff0c\u6709\u591a\u79cd\u65b9\u5f0f\u53ef\u4ee5\u5b9e\u73b0\u3002\u672c\u6587\u4ecb\u7ecd\u901a\u8fc7 Tailscale \u7ec4\u7f51\uff0c\u4f7f\u7528VPS \u53cd\u5411\u4ee3\u7406\u6765\u5b9e\u73b0\u8bbf\u95ee\u5185\u7f51\u670d\u52a1\u7684\u65b9\u6848\u3002<\/p>\n<p style=\"text-align: justify;\">\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u5185\u7f51\u670d\u52a1\u5668\u4e0e vps \u7ec4\u7f51\uff0c\u7136\u540e\u901a\u8fc7 vps \u7684\u516c\u7f51\u5730\u5740\u8bbf\u95ee\u5185\u7f51\u535a\u5ba2\u3002\u8be5\u65b9\u6848\u7684\u8bbf\u95ee\u5bb9\u91cf\u4e3b\u8981\u53d7\u5185\u7f51\u7684\u4e0a\u4f20\u5e26\u5bbd\u9650\u5236\uff0c\u5bb6\u5ead\u5bbd\u5e26\u4e0a\u4f20\u5927\u591a\u88ab\u9650\u5236\u5728 60Mbps \u4ee5\u4e0b\uff0c\u8f7b\u91cf\u7ea7\u7f51\u7edc\u670d\u52a1\u6ca1\u6709\u4efb\u4f55\u95ee\u9898\u3002<\/p>\n<h2 style=\"text-align: justify;\">\u6d4b\u8bd5\u73af\u5883<\/h2>\n<ul style=\"text-align: justify;\">\n<li>VPS \uff1aUbuntu 22.04.5\u3001nginx 1.18<\/li>\n<li>\u672c\u5730\uff1aDebian 13\u3001nginx 1.18\u3001PHP 8.4\u3001WordPress blog<\/li>\n<li>\u57df\u540d\uff1ablog.example.com<\/li>\n<\/ul>\n<h2 style=\"text-align: justify;\">\u57df\u540d\u914d\u7f6e<\/h2>\n<p style=\"text-align: justify;\">\u5c06\u7533\u8bf7\u7684\u57df\u540d\u8fc1\u79fb\u5230Cloudflare\uff0c\u6dfb\u52a0 DNS \u8bb0\u5f55\uff0c\u5e76\u6253\u5f00\u4ee3\u7406\u3002<\/p>\n<h2 style=\"text-align: justify;\"><span id=\"05_%E8%B4%AD%E4%B9%B0%E4%B8%80%E5%8F%B0%E5%85%AC%E7%BD%91_VPS\"><\/span>VPS\u914d\u7f6e<\/h2>\n<p style=\"text-align: justify;\">\u63a8\u8350\u4f7f\u7528\u4f4e\u5ef6\u8fdf vps\uff0c\u6709\u52a9\u4e8e\u63d0\u5347\u7f51\u7edc\u7684\u54cd\u5e94\u901f\u5ea6\u3002<\/p>\n<h4 style=\"text-align: justify;\">1.\u5b89\u88c5nginx<\/h4>\n<pre class=\"code\">apt install nginx -y<\/pre>\n<h4 class=\"code\" style=\"text-align: justify;\">2.\u7533\u8bf7\u57df\u540d\u8bc1\u4e66<\/h4>\n<pre class=\"code\">apt install certbot python3-certbot-nginx -y\r\ncertbot --nginx -d blog.example.com<\/pre>\n<h4 style=\"text-align: justify;\"><span id=\"2_%E7%BB%84%E5%BB%BA%E8%99%9A%E6%8B%9F%E5%86%85%E7%BD%91\"><\/span>3. \u7ec4\u5efa\u865a\u62df\u5185\u7f51<\/h4>\n<p style=\"text-align: justify;\">\u6253\u5f00<span style=\"color: #0000ff;\"><strong>\u00a0<\/strong><\/span><a href=\"https:\/\/tailscale.com\/\"><span style=\"color: #0000ff;\"><strong>tailscale.com<\/strong><\/span><\/a>\uff0c\u6ce8\u518c\u8d26\u53f7\u5e76\u65b0\u5efa\u865a\u62df\u5185\u7f51\uff0c\u5c06\u4e24\u53f0\u4e3b\u673a\u90fd\u52a0\u5165\u540c\u4e00\u5185\u7f51\u3002<\/p>\n<p style=\"text-align: justify;\">\u5728\u4e24\u53f0\u4e3b\u673a\u4e0a\u5206\u522b\u5b89\u88c5 tailscale:<\/p>\n<pre class=\"code\">curl -fsSL https:\/\/tailscale.com\/install.sh | sh<\/pre>\n<p style=\"text-align: justify;\">\u542f\u52a8tailscale \u5e76\u8ba4\u8bc1\uff1a<\/p>\n<pre class=\"code\">sudo tailscale up<\/pre>\n<p style=\"text-align: justify;\">\u7ec4\u7f51\u6210\u529f\u4ee5\u540e\uff0c\u5728 vps \u4e0a ping \u5185\u7f51\u670d\u52a1\u5668\u7684\u7684 tailscale ip\uff0c\u68c0\u67e5\u662f\u5426\u8fde\u901a\u3002<\/p>\n<p style=\"text-align: justify;\">\u6ce8\u610f\uff1a\u4e24\u4e2a\u8282\u70b9\u7684\u7981\u7528\u5bc6\u94a5\u8fc7\u671f\u9009\u9879\u5fc5\u987b\u9009\u4e2d\uff0c\u4ee5\u9632\u6b62\u5bc6\u94a5\u8fc7\u671f\u540e\uff0c\u8fde\u63a5\u5931\u6548\u3002<\/p>\n<h4 style=\"text-align: justify;\"><span id=\"3_VPS_%E5%8F%8D%E4%BB%A3%E6%9C%AC%E5%9C%B0%E6%9C%8D%E5%8A%A1\"><\/span>4. VPS\u53cd\u4ee3\u8bbe\u7f6e<\/h4>\n<p style=\"text-align: justify;\">\u5728\/etc\/nginx\/sites-available\u76ee\u5f55\uff0c\u65b0\u5efa\u4e00\u4e2a\u4ee5\u57df\u540d\u547d\u540d\u7684\u6587\u4ef6\uff0c\u5982 blog.example.com\uff0c\u6587\u4ef6\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<pre class=\"code\">server {\r\n  if ($host = blog.example.com) {\r\n      return 301 https:\/\/$host$request_uri;\r\n  } # managed by Certbot\r\n\r\n  listen 80;\r\n  server_name blog.example.com;\r\n  return 301 https:\/\/$host$request_uri;\r\n  proxy_set_header Host $host;\r\n  proxy_set_header X-Real-IP $remote_addr;\r\n  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\n  proxy_set_header X-Forwarded-Proto https;}\r\n\r\nserver {\r\n  listen 443 ssl http2;\r\n  server_name blog.example.com;\r\n  ssl_certificate \/etc\/letsencrypt\/live\/blog.example.com\/fullchain.pem; # managed by Certbot\r\n  ssl_certificate_key \/etc\/letsencrypt\/live\/blog.example.com\/privkey.pem; # managed by Certbot\r\n\r\nlocation \/ {\r\n  proxy_pass http:\/\/100.105.151.88:80;# Debian13 Tailscale IP\r\n  \r\n  proxy_set_header Host $host;\r\n  proxy_set_header X-Real-IP $remote_addr;\r\n  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\n  proxy_set_header X-Forwarded-Proto https;proxy_http_version 1.1;\r\n  proxy_set_header Connection \"\";\r\n}\r\n}<\/pre>\n<p style=\"text-align: justify;\">\u4fdd\u5b58\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u8ba9\u53cd\u4ee3\u8bbe\u7f6e\u751f\u6548\uff1a<\/p>\n<pre class=\"code\">ln -s \/etc\/nginx\/sites-available\/blog.example.com \/etc\/nginx\/sites-enabled\/<\/pre>\n<pre class=\"code\">nginx -t &amp;&amp; systemctl reload nginx<\/pre>\n<h2 style=\"text-align: justify;\"><span id=\"%E6%9C%AC%E5%9C%B0%E6%9C%BA%E8%AE%BE%E7%BD%AE\"><\/span>\u672c\u5730\u8bbe\u7f6e<\/h2>\n<h4 style=\"text-align: justify;\">1.\u5b89\u88c5\u57fa\u7840\u73af\u5883<\/h4>\n<pre class=\"code\">apt update\r\napt install -y nginx php-fpm php-mysql php-gd php-curl php-mbstring php-xml php-zip mariadb-server unzip<\/pre>\n<h4 style=\"text-align: justify;\">2.\u914d\u7f6e\u6570\u636e\u5e93<\/h4>\n<p style=\"text-align: justify;\">\u8fdb\u5165 sql \u6570\u636e\u5e93\u73af\u5883<\/p>\n<pre class=\"code\">mysql<\/pre>\n<p style=\"text-align: justify;\">\u6570\u636e\u5e93\u4fe1\u606f\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>\u6570\u636e\u5e93\u540d\uff1awordpress<\/li>\n<li>\u7528\u6237\u540d\uff1awpuser<\/li>\n<li>\u5bc6\u7801\uff1a112233<\/li>\n<li><span class=\"s1\">\u4e3b\u673a\uff1a<\/span>localhost<\/li>\n<\/ul>\n<p>\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u5efa\u7acb\u4e0a\u9762\u7684\u6570\u636e\u5e93\uff1a<\/p>\n<pre class=\"code\">CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8mb4;\r\nCREATE USER 'wpuser'@'localhost' IDENTIFIED BY '112233';\r\nGRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost';\r\nFLUSH PRIVILEGES;<\/pre>\n<p>\u67e5\u770b\u6570\u636e\u5e93<\/p>\n<pre class=\"code\">SHOW DATABASES;<\/pre>\n<p style=\"text-align: justify;\">\u9000\u51fa\u6570\u636e\u5e93<\/p>\n<pre class=\"code\">exit<\/pre>\n<h4><b>3.\u5b89\u88c5 phpMyAdmin<\/b><\/h4>\n<p>\u4e3a\u65b9\u4fbf\u5bf9\u6570\u636e\u5e93\u8fdb\u884c\u53ef\u89c6\u5316\u64cd\u4f5c\uff0c\u5efa\u8bae\u5b89\u88c5 phpMyAdmin\u3002<\/p>\n<pre class=\"code\">cd \/usr\/share\r\nsudo wget https:\/\/www.phpmyadmin.net\/downloads\/phpMyAdmin-latest-all-languages.tar.gz\r\nsudo tar xvf phpMyAdmin-latest-all-languages.tar.gz\r\nsudo mv phpMyAdmin-*-all-languages phpmyadmin\r\nsudo rm phpMyAdmin-latest-all-languages.tar.gz\r\nsudo mkdir \/usr\/share\/phpmyadmin\/tmp\r\nsudo chown -R www-data:www-data \/usr\/share\/phpmyadmin\/tmp\r\nsudo chmod 777 \/usr\/share\/phpmyadmin\/tmp<\/pre>\n<p>\u6253\u5f00\u6d4f\u89c8\u5668\u8bbf\u95ee\uff1a<span style=\"background-color: #f5f5f5; font-family: Consolas, Monaco, monospace;\">http:\/\/&lt;Debian-IP&gt;\/phpmyadmin<\/span>\uff0c\u8f93\u5165\u6570\u636e\u5e93\u7528\u6237\u540d\u548c\u5bc6\u7801\u5373\u53ef\u8bbf\u95ee phpMyAdmin<\/p>\n<h4 style=\"text-align: justify;\">4.\u7981\u7528 apache<\/h4>\n<p>\u5728 Debian 13\u4e0a\uff0cApache \u9ed8\u8ba4\u5360\u7528 80\u3002\u67e5\u770b 80 \u7aef\u53e3\u662f\u5426\u88ab\u5360\u7528\uff1a<\/p>\n<pre class=\"code\">ss -lntp | grep :80<\/pre>\n<p>\u5982\u679c\u663e\u793a\u4ee5\u4e0b\u4fe1\u606f\uff0c\u5219 80 \u7aef\u53e3\u88ab apache \u5360\u7528\uff1a<\/p>\n<pre class=\"code\">LISTEN 0 511 0.0.0.0:80 users:((\"apache2\",pid=xxx,fd=4))<\/pre>\n<p>\u7981\u7528 apache\uff0c\u4ee5\u4fbf\u91ca\u653e 80 \u7aef\u53e3\u7ed9 wordpress \u4f7f\u7528\u3002<\/p>\n<pre class=\"code\">systemctl stop apache2\r\nsystemctl stop apache2.socket\r\nsystemctl stop apache2.service\r\nsystemctl disable apache2\r\nsystemctl disable apache2.socket\r\nsystemctl disable apache2.service<\/pre>\n<p>\u5982\u679c\u4e0d\u9700\u8981 apache\uff0c\u53ef\u4ee5\u76f4\u63a5\u5378\u8f7d\uff1a<\/p>\n<pre class=\"code\">apt purge -y apache2 apache2-utils apache2-bin apache2.2-common\r\napt autoremove -y<\/pre>\n<h4 style=\"text-align: justify;\">5.\u5b89\u88c5 wordpress<\/h4>\n<pre class=\"code\">cd \/var\/www\r\nwget https:\/\/wordpress.org\/latest.tar.gz\r\ntar xzf latest.tar.gz\r\ncp -a wordpress\/* \/var\/www\/html\/\r\nchown -R www-data:www-data \/var\/www\/html\r\nfind \/var\/www\/html -type d -exec chmod 755 {} \\;\r\nfind \/var\/www\/html -type f -exec chmod 644 {} \\;<\/pre>\n<p>\u786e\u4fdd WordPress \u5b89\u88c5 \u5728\/var\/www\/html\u76ee\u5f55\u4e0b\u3002\u5b89\u88c5\u5b8c\u6210\uff0c\u8bbf\u95eehttp:\/\/&lt;Debian-IP&gt;\/wp-admin\/install.php\uff0c\u6839\u636e\u63d0\u793a\u5b8c\u6210\u535a\u5ba2\u7684\u914d\u7f6e\u3002<\/p>\n<h4 style=\"text-align: justify;\">6.<b>Nginx\u8bbe\u7f6e<\/b><\/h4>\n<p style=\"text-align: justify;\">\u65b0\u5efa\/etc\/nginx\/sites-available\/wordpress\u6587\u4ef6\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<pre class=\"code\">server {\r\n    listen 80;\r\n    server_name _;\r\n\r\n    root \/var\/www\/html;\r\n    index index.php index.html; \r\n\r\n    client_max_body_size 256M;\r\nlocation \/ {\r\n        try_files $uri $uri\/ \/index.php?$args;\r\n    }\r\n    location ~ \\.php$ {\r\n        include snippets\/fastcgi-php.conf;\r\n        fastcgi_pass unix:\/run\/php\/php8.4-fpm.sock;\r\n    }\r\n\r\n    location ~* \\.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2)$ {\r\n        expires max;\r\n        log_not_found off;\r\n    }\r\nlocation \/phpmyadmin {\r\n    root \/usr\/share\/;\r\n    index index.php index.html index.htm;\r\n     \r\n    location ~ ^\/phpmyadmin\/(.+\\.php)$ {\r\n        try_files $uri =404;\r\n        root \/usr\/share\/;\r\n        fastcgi_pass unix:\/run\/php\/php8.4-fpm.sock; # \u4fee\u6539\u4e3a\u4f60 PHP-FPM \u7684\u7248\u672c\r\n        fastcgi_index index.php;\r\n        include fastcgi_params;\r\n        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n    }\r\n    location ~* ^\/phpmyadmin\/(.+\\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {\r\n        root \/usr\/share\/;\r\n    }\r\n}\r\n}<\/pre>\n<p>\u4fdd\u5b58\u540e\u91cd\u8f7d Nginx\uff1a<\/p>\n<pre class=\"code\">nginx -t &amp;&amp; systemctl reload nginx<\/pre>\n<h4>7.\u4fee\u6539\u7ad9\u70b9\u5730\u5740<\/h4>\n<p>\u6d4f\u89c8\u5668\u8f93\u5165\uff1ahttp:\/\/&lt;Debian-IP&gt;\/wp-login.php\uff0c\u767b\u5f55WordPress\u540e\u53f0\uff0c\u627e\u5230\u8bbe\u7f6e&gt;\u5e38\u89c4\uff0c\u5c06WordPress \u5730\u5740\u548c\u7ad9\u70b9\u5730\u5740\u4fee\u6539\u4e3ahttps:\/\/blog.example.com\u5e76\u4fdd\u5b58\u3002<\/p>\n<p>\u73b0\u5728\u53ef\u4ee5\u7528<em>https:\/\/blog.example.com<\/em>\u5730\u5740\u8bbf\u95ee\u5185\u7f51\u535a\u5ba2\u4e86\u3002<\/p>\n<h2 style=\"text-align: justify;\"><span id=\"4_WordPress_%E5%8F%8D%E4%BB%A3%E5%90%8E%E7%9A%84_HTTPS_%E9%97%AE%E9%A2%98\"><\/span>\u5176\u4ed6\u95ee\u9898<\/h2>\n<h4 style=\"text-align: justify;\">1.\u8bbf\u95ee\u5f02\u5e38<\/h4>\n<p style=\"text-align: justify;\">\u4e00\u822c\u7684\u7f51\u7edc\u670d\u52a1\u5230\u8fd9\u5c31\u80fd\u6b63\u5e38\u8bbf\u95ee\uff0c\u4f46 WordPress \u4f7f\u7528 SSL + \u53cd\u5411\u4ee3\u7406\u65f6\u53ef\u80fd\u4f1a\u9047\u5230\u6837\u5f0f\u4e22\u5931\u95ee\u9898\u3002\u53ef\u4ee5\u4fee\u6539 wp-config.php \u6587\u4ef6\u6765\u89e3\u51b3\u8be5\u95ee\u9898\u3002<\/p>\n<div>\u5728\u8fd9\u6bb5\u4ee3\u7801\u4e4b\u524d\uff0c<\/div>\n<div>\n<div>\n<div><\/div>\n<div>\n<pre class=\"code\">\/** Sets up WordPress vars and included files. *\/\r\nrequire_once ABSPATH . 'wp-settings.php';<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<div>\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/div>\n<div>\n<div>\n<div>\n<pre class=\"code\">define('WP_HOME', 'https:\/\/<em>blog.example.com<\/em>');\r\ndefine('WP_SITEURL', 'https:\/\/<em>blog.example.com<\/em>');\r\n\r\nif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) &amp;&amp; $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {\r\n    $_SERVER['HTTPS'] = 'on';\r\n}<\/pre>\n<p>\u4fdd\u5b58\u5373\u53ef\u3002<\/p>\n<h4>2.<b>\u8c03\u6574\u4e0a\u4f20\u9650\u5236<\/b><\/h4>\n<p>\u4fee\u6539 PHP \u4e0a\u4f20\u9650\u5236\u3002<\/p>\n<p>\u5148\u786e\u8ba4 PHP \u7248\u672c\uff1a<\/p>\n<pre class=\"code\">php -v<\/pre>\n<p class=\"p1\">\u5047\u8bbe\u662f <span class=\"s1\"><b>PHP 8.4<\/b><\/span>\uff0c\u7f16\u8f91\u914d\u7f6e\uff1a<\/p>\n<pre class=\"code\">nano \/etc\/php\/8.4\/fpm\/php.ini<\/pre>\n<p class=\"p1\">\u627e\u5230\u5e76\u4fee\u6539\u4e0b\u9762 3 \u9879\uff1a<\/p>\n<pre class=\"code\">upload_max_filesize = 256M\r\npost_max_size = 256M\r\nmemory_limit = 512M\r\nmax_execution_time = 300\r\nmax_input_time = 300<\/pre>\n<p>\u5982\u679c\u6570\u636e\u5e93\u5907\u4efd &gt; 256M\uff0c\u53ef\u4ee5\u6539\u6210 512M \u6216 1024M\u3002<\/p>\n<p class=\"code\">\u4fee\u6539\u5b8c\u6210\uff0c\u91cd\u542f PHP-FPM\uff1a<\/p>\n<\/div>\n<\/div>\n<pre class=\"code\">systemctl restart php8.4-fpm<\/pre>\n<\/div>\n<h4>3.\u4fee\u6539 Nginx \u4e0a\u4f20\u9650\u5236<\/h4>\n<p class=\"p1\">\u7f16\u8f91WordPress \/ phpMyAdmin \u6240\u5728\u7684 server\uff1a<\/p>\n<pre class=\"code\">nano \/etc\/nginx\/sites-enabled\/wordpress<\/pre>\n<p class=\"p1\"><span class=\"s1\">\u5728 <\/span>server {}<span class=\"s1\"> \u91cc\u52a0\u4e00\u884c\uff1a<\/span><\/p>\n<pre class=\"code\">client_max_body_size 256M;<\/pre>\n<p class=\"p1\">\u4f8b\u5982\uff1a<\/p>\n<pre class=\"code\">server {\r\n    listen 80;\r\n    server_name blog.example.com;\r\n\r\n    client_max_body_size 256M;\r\n    ...\r\n}<\/pre>\n<p>\u4fee\u6539\u5b8c\u6210\uff0c\u91cd\u542f Nginx:<\/p>\n<pre class=\"code\">nginx -t &amp;&amp; systemctl reload nginx<\/pre>\n<h4>4.\u9650\u5236\u5185\u7f51\u8bbf\u95ee<\/h4>\n<p>\u5982\u679c\u4e0d\u60f3\u8ba9\u5185\u7f51\u8bbf\u95ee\u5230\u535a\u5ba2\uff0c\u53ef\u4ee5\u5728 Nginx \u4e2d\u9650\u5236\u8bbf\u95ee\u7684\u6e90 IP\uff0c\u4f8b\u5982\u53ea\u8ba9vps\u7684 tailscale IP\u8bbf\u95ee\u3002<\/p>\n<pre class=\"code\">nano \/etc\/nginx\/sites-enabled\/wordpress<\/pre>\n<p><span class=\"s1\">\u5728 <\/span><span class=\"s2\">server {}<\/span><span class=\"s1\"> \u91cc\u52a0 <\/span>allow \/ deny<span class=\"s1\">\uff1a<\/span><\/p>\n<p class=\"p1\">\u4f8b\u5982\uff1a<\/p>\n<pre class=\"code\">server {\r\n    listen 80;\r\n    server_name blog.example.com;\r\n\r\n    # \u53ea\u5141\u8bb8 VPS \u7684 Tailscale IP\r\n<span class=\"s1\">    allow<\/span> 100.127.66.5<span class=\"s2\">;\r\n<\/span><span class=\"s1\">    deny<\/span> all;\r\n\r\n    client_max_body_size 256M;\r\n    ...\r\n}<\/pre>\n<p>\u4fee\u6539\u5b8c\u6210\uff0c\u91cd\u542f Nginx:<\/p>\n<pre class=\"code\">nginx -t &amp;&amp; systemctl reload nginx<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u5bb6\u5ead\u7f51\u7edc\u73af\u5883\u4e2d\uff0c\u5982\u679c\u6ca1\u6709\u516c\u7f51 IP\uff0c\u4f46\u53c8\u60f3\u5bf9\u5916\u53d1\u5e03\u670d\u52a1\uff0c\u6709\u591a\u79cd\u65b9\u5f0f\u53ef\u4ee5\u5b9e\u73b0\u3002\u672c &hellip; <a href=\"https:\/\/blog.pfchina.org\/?p=15557\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[373,459],"class_list":["post-15557","post","type-post","status-publish","format-standard","hentry","category-other","tag-tailscale","tag-459"],"_links":{"self":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/15557","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15557"}],"version-history":[{"count":4,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/15557\/revisions"}],"predecessor-version":[{"id":15567,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=\/wp\/v2\/posts\/15557\/revisions\/15567"}],"wp:attachment":[{"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15557"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pfchina.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}