{"id":51,"date":"2026-07-23T14:48:46","date_gmt":"2026-07-23T06:48:46","guid":{"rendered":"https:\/\/bbs.diuz.cn\/?p=51"},"modified":"2026-07-23T14:51:27","modified_gmt":"2026-07-23T06:51:27","slug":"14-%e4%b8%aa-qa%ef%bc%8c%e5%88%86%e5%ae%89%e8%a3%85%e9%98%b6%e6%ae%b5%e3%80%81%e8%bf%90%e8%a1%8c%e9%98%b6%e6%ae%b5%e3%80%81%e5%90%8e%e5%8f%b0%e4%b8%89%e7%b1%bb","status":"publish","type":"post","link":"https:\/\/bbs.diuz.cn\/?p=51","title":{"rendered":"14 \u4e2a Q&#038;A\uff0c\u5206\u5b89\u88c5\u9636\u6bb5\u3001\u8fd0\u884c\u9636\u6bb5\u3001\u540e\u53f0\u4e09\u7c7b"},"content":{"rendered":"# \u4e5d\u3001\u5e38\u89c1\u95ee\u9898\u6392\u67e5\r\n\r\n## 9.1 \u5b89\u88c5\u9636\u6bb5\u95ee\u9898\r\n\r\n**Q1\uff1a\u8bbf\u95ee install.php \u663e\u793a 404 \u6216\u7a7a\u767d\u9875**\r\n\r\n\u6700\u5e38\u89c1\u7684 3 \u4e2a\u539f\u56e0\uff08\u6309\u6982\u7387\u6392\u5e8f\uff09\uff1a\r\n1. **PHP \u7248\u672c\u4e0d\u662f 8.1** \u2192 \u5b9d\u5854 \u2192 \u7f51\u7ad9 \u2192 \u4f60\u7684\u57df\u540d \u2192 PHP \u7248\u672c \u2192 \u9009 PHP-81 \u2192 \u4fdd\u5b58\r\n2. **\u57df\u540d\u89e3\u6790\u672a\u751f\u6548** \u2192 \u7528 `ping \u4f60\u7684\u57df\u540d` \u786e\u8ba4 IP \u662f\u5426\u6b63\u786e\r\n3. **\u6587\u4ef6\u672a\u4e0a\u4f20\u5230\u6b63\u786e\u76ee\u5f55** \u2192 \u786e\u8ba4 `install.php` \u5728 `\/www\/wwwroot\/\u4f60\u7684\u57df\u540d\/` \u4e0b\r\n\r\n**Q2\uff1a\u5b89\u88c5\u754c\u9762\"\u73af\u5883\u68c0\u6d4b\"\u6709\u7ea2\u8272 \u274c**\r\n\r\n| \u9519\u8bef\u63d0\u793a | \u89e3\u51b3\u65b9\u6cd5 |\r\n|---------|---------|\r\n| PHP \u7248\u672c\u8fc7\u4f4e | \u5b89\u88c5 PHP 8.1\uff08\u5b9d\u5854 \u2192 \u8f6f\u4ef6\u5546\u5e97 \u2192 PHP \u2192 \u5b89\u88c5 8.1\uff09 |\r\n| pdo_mysql \u672a\u5b89\u88c5 | PHP-8.1 \u2192 \u8bbe\u7f6e \u2192 \u5b89\u88c5\u6269\u5c55 \u2192 \u52fe\u9009 pdo_mysql \u2192 \u5b89\u88c5 |\r\n| \u76ee\u5f55\u4e0d\u53ef\u5199 | \u6587\u4ef6\u7ba1\u7406\u5668 \u2192 \u53f3\u952e\u7ad9\u70b9\u6839\u76ee\u5f55 \u2192 \u6743\u9650 \u2192 755 \u2192 \u6240\u6709\u8005 www \u2192 \u5e94\u7528\u5230\u5b50\u76ee\u5f55 |\r\n| \u67d0\u6269\u5c55\u672a\u5b89\u88c5 | \u53c2\u7167\u4e0a\u65b9\u5217\u8868\u5b89\u88c5\u5bf9\u5e94\u6269\u5c55\u5e76\u91cd\u542f PHP |\r\n\r\n**Q3\uff1a\u6570\u636e\u5e93\u8fde\u63a5\u5931\u8d25**\r\n\r\n\u6309\u4ee5\u4e0b\u987a\u5e8f\u6392\u67e5\uff1a\r\n1. \u6570\u636e\u5e93\u540d\u3001\u7528\u6237\u540d\u3001\u5bc6\u7801\u662f\u5426\u586b\u9519\uff08\u6ce8\u610f\u4e0d\u8981\u6709\u591a\u4f59\u7a7a\u683c\uff09\r\n2. \u6570\u636e\u5e93\u4e3b\u673a\u662f\u5426\u586b\u7684 `127.0.0.1`\uff08\u4e0d\u8981\u586b `localhost`\uff09\r\n3. \u6570\u636e\u5e93\u662f\u5426\u88ab\u5220\u9664 \u2192 \u5b9d\u5854 \u2192 \u6570\u636e\u5e93 \u2192 \u67e5\u770b\u662f\u5426\u5b58\u5728\r\n\r\n**Q4\uff1a\u5b89\u88c5\u65f6\u4e00\u76f4\u8f6c\u5708**\r\n\r\n\u539f\u56e0\uff1a\u6570\u636e\u5e93\u4fe1\u606f\u6709\u8bef\u6216\u6570\u636e\u5e93\u7528\u6237\u6743\u9650\u4e0d\u8db3\u3002\r\n\r\n\u89e3\u51b3\u65b9\u6cd5\uff1a\r\n1. \u5b9d\u5854 \u2192 \u6570\u636e\u5e93 \u2192 \u627e\u5230\u5bf9\u5e94\u6570\u636e\u5e93 \u2192 \u70b9\u51fb **\u6743\u9650** \u2192 \u786e\u8ba4\u4e3a `ALL PRIVILEGES`\r\n2. \u5982\u679c\u4e0d\u662f\uff0c\u6539\u4e3a `ALL PRIVILEGES` \u6216\u5220\u5e93\u91cd\u5efa\r\n\r\n**Q5\uff1a\u5b89\u88c5\u5b8c\u6210\u540e\u8bbf\u95ee\u9996\u9875\u4ecd\u8df3\u8f6c\u5230 install.php**\r\n\r\n\u539f\u56e0\uff1a\u5b89\u88c5\u7a0b\u5e8f\u672a\u6210\u529f\u751f\u6210\u5b89\u88c5\u9501\u6587\u4ef6\u3002\r\n\r\n\u89e3\u51b3\uff1a\r\n1. \u8bbf\u95ee `http:\/\/\u4f60\u7684\u57df\u540d\/install.php?reinstall=1` \u91cd\u65b0\u5b89\u88c5\r\n2. \u6216\u624b\u52a8\u521b\u5efa\u9501\u6587\u4ef6\uff1a\u5b9d\u5854 \u2192 \u6587\u4ef6 \u2192 \u7ad9\u70b9\u6839\u76ee\u5f55 \u2192 \u65b0\u5efa\u6587\u4ef6 `installed.lock`\uff0c\u5185\u5bb9\u4efb\u610f\r\n\r\n## 9.2 \u8fd0\u884c\u9636\u6bb5\u95ee\u9898\r\n\r\n**Q6\uff1a\u90e8\u5206\u9875\u9762\u663e\u793a 404\uff08\u5982 \/home\u3001\/compose\uff09**\r\n\r\n\u539f\u56e0\uff1a\u4f2a\u9759\u6001\u89c4\u5219\u672a\u914d\u7f6e\u6216\u914d\u7f6e\u9519\u8bef\u3002\r\n\r\n\u89e3\u51b3\uff1a\r\n1. \u5b9d\u5854 \u2192 \u7f51\u7ad9 \u2192 \u4f60\u7684\u57df\u540d \u2192 \u8bbe\u7f6e \u2192 \u4f2a\u9759\u6001\r\n2. \u786e\u8ba4\u5185\u5bb9\u4e3a Nginx rewrite \u89c4\u5219\uff08\u89c1\u4e0b\u65b9\u4f2a\u9759\u6001\u914d\u7f6e\u793a\u4f8b\uff09\r\n3. \u4e0d\u662f\u4e0b\u62c9\u9009\u62e9\uff0c\u662f\u76f4\u63a5\u7c98\u8d34\u4ee3\u7801\r\n4. \u4fdd\u5b58\u540e\u91cd\u542f Nginx\r\n\r\n```nginx\r\nlocation \/ {\r\n    try_files $uri $uri\/ \/index.php?$args;\r\n}\r\n```\r\n\r\n> Apache \u7528\u6237\u7f16\u8f91 `.htaccess` \u6587\u4ef6\uff1a\r\n> ```apache\r\n> RewriteEngine On\r\n> RewriteCond %{REQUEST_FILENAME} !-f\r\n> RewriteCond %{REQUEST_FILENAME} !-d\r\n> RewriteRule ^(.*)$ index.php?page=$1 [QSA,L]\r\n> ```\r\n\r\n**Q7\uff1a\u7528\u6237\u6ce8\u518c\u540e\u6536\u4e0d\u5230\u9a8c\u8bc1\u90ae\u4ef6**\r\n\r\n\u6309\u987a\u5e8f\u6392\u67e5\uff1a\r\n1. SMTP \u914d\u7f6e\u662f\u5426\u5df2\u586b\u5199\uff08\u540e\u53f0 \u2192 \u7cfb\u7edf\u8bbe\u7f6e \u2192 \u90ae\u4ef6\u914d\u7f6e\uff09\r\n2. SMTP \u6388\u6743\u7801\u662f\u5426\u6b63\u786e\uff08QQ \u90ae\u7bb1\u662f\u6388\u6743\u7801\u4e0d\u662f\u5bc6\u7801\uff09\r\n3. \u4f7f\u7528\"\u6d4b\u8bd5\u53d1\u9001\"\u6309\u94ae\u9a8c\u8bc1\u914d\u7f6e\r\n4. \u68c0\u67e5\u90ae\u7bb1\u5783\u573e\u7bb1\r\n\r\n**Q8\uff1a\u4fe1\u4ef6\u5230\u8fbe\u65f6\u95f4\u540e\u6ca1\u6709\u53d1\u9001**\r\n\r\n\u6309\u987a\u5e8f\u6392\u67e5\uff1a\r\n1. \u5b9a\u65f6\u4efb\u52a1\u662f\u5426\u914d\u7f6e\uff08\u5b9d\u5854 \u2192 \u8ba1\u5212\u4efb\u52a1 \u2192 \u67e5\u770b\u5217\u8868\uff09\r\n2. \u5b9a\u65f6\u4efb\u52a1\u662f\u5426\u6267\u884c\uff08\u67e5\u770b `logs\/cron.log` \u662f\u5426\u6709\u6700\u8fd1\u8bb0\u5f55\uff09\r\n3. SMTP \u914d\u7f6e\u662f\u5426\u6b63\u5e38\uff08\u540e\u53f0\u6d4b\u8bd5\u53d1\u9001\uff09\r\n4. \u624b\u52a8\u6267\u884c\u4e00\u6b21\u6d4b\u8bd5\uff1a\r\n\r\n```bash\r\n\/www\/server\/php\/81\/bin\/php \/www\/wwwroot\/\u4f60\u7684\u57df\u540d\/cron\/run.php\r\n```\r\n\r\n5. \u67e5\u770b\u8f93\u51fa\u4e2d\u7684\u5177\u4f53\u9519\u8bef\u4fe1\u606f\r\n\r\n**Q9\uff1a\u9875\u9762\u663e\u793a 500 \u9519\u8bef**\r\n\r\n\u89e3\u51b3\u6b65\u9aa4\uff1a\r\n1. \u67e5\u770b\u9519\u8bef\u65e5\u5fd7\uff1a\u5b9d\u5854 \u2192 \u7f51\u7ad9 \u2192 \u4f60\u7684\u57df\u540d \u2192 \u9519\u8bef\u65e5\u5fd7\r\n2. \u6216\u7ec8\u7aef\u6267\u884c\uff1a\r\n\r\n```bash\r\ntail -50 \/www\/wwwroot\/\u4f60\u7684\u57df\u540d\/logs\/error.log\r\ntail -50 \/www\/wwwlogs\/\u4f60\u7684\u57df\u540d.error.log\r\n```\r\n\r\n**Q10\uff1a\u56fe\u7247\u4e0a\u4f20\u5931\u8d25**\r\n\r\n\u53ef\u80fd\u539f\u56e0\uff1a\r\n1. `uploads\/` \u76ee\u5f55\u6743\u9650\u4e0d\u8db3 \u2192 \u8bbe\u4e3a 777\r\n2. PHP \u4e0a\u4f20\u9650\u5236\u592a\u5c0f \u2192 PHP-8.1 \u2192 \u914d\u7f6e\u4fee\u6539 \u2192 \u8c03\u5927 `upload_max_filesize` \u548c `post_max_size`\r\n3. \u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db3 \u2192 \u5b9d\u5854\u9996\u9875\u67e5\u770b\r\n\r\n**Q11\uff1a\u9875\u9762\u6837\u5f0f\u9519\u4e71**\r\n\r\n\u6309 `Ctrl + F5` \u5f3a\u5236\u5237\u65b0\u6d4f\u89c8\u5668\u7f13\u5b58\u3002\u5982\u4ecd\u5f02\u5e38\uff0c\u68c0\u67e5\u6d4f\u89c8\u5668\u63a7\u5236\u53f0\uff08F12\uff09\u662f\u5426\u6709 CSS \u52a0\u8f7d\u5931\u8d25\u7684\u63d0\u793a\u3002\r\n\r\n**Q12\uff1aSSL \u8bc1\u4e66\u5230\u671f**\r\n\r\n1. \u5b9d\u5854 \u2192 \u7f51\u7ad9 \u2192 \u4f60\u7684\u57df\u540d \u2192 \u8bbe\u7f6e \u2192 SSL\r\n2. \u5982\u679c\u4f7f\u7528\u4e86 Let's Encrypt\uff0c\u70b9\u51fb\"\u7eed\u7b7e\"\r\n3. \u5982\u4f7f\u7528\u4ed8\u8d39\u8bc1\u4e66\uff0c\u91cd\u65b0\u4e0a\u4f20\u65b0\u8bc1\u4e66\r\n\r\n## 9.3 \u540e\u53f0\u95ee\u9898\r\n\r\n**Q13\uff1a\u540e\u53f0\u65e0\u6cd5\u767b\u5f55**\r\n\r\n- \u786e\u8ba4\u4f7f\u7528\u7ba1\u7406\u5458\u90ae\u7bb1\u767b\u5f55\uff08\u4e0d\u662f\u666e\u901a\u7528\u6237\u90ae\u7bb1\uff09\r\n- \u5982\u5fd8\u8bb0\u5bc6\u7801\uff0c\u901a\u8fc7\u6570\u636e\u5e93\u76f4\u63a5\u91cd\u7f6e\uff1a\u5b9d\u5854 \u2192 \u6570\u636e\u5e93 \u2192 \u7ba1\u7406\uff08phpMyAdmin\uff09\u2192 `users` \u8868 \u2192 \u7f16\u8f91\u7ba1\u7406\u5458\u884c\u7684 `password` \u5b57\u6bb5\r\n\r\n**Q14\uff1a\u66f4\u65b0\u5931\u8d25**\r\n\r\n- \u68c0\u67e5 `runtime\/` \u76ee\u5f55\u662f\u5426\u53ef\u5199\r\n- \u67e5\u770b\u540e\u53f0\u9519\u8bef\u65e5\u5fd7\u4e86\u89e3\u5177\u4f53\u9519\u8bef\r\n- \u786e\u8ba4 `.env` \u4e2d\u7684 `SUBSCRIPTION_API_KEY` \u914d\u7f6e\u6b63\u786e\r\n","protected":false},"excerpt":{"rendered":"<p># \u4e5d\u3001\u5e38\u89c1\u95ee\u9898\u6392\u67e5 ## 9.1 \u5b89\u88c5\u9636\u6bb5\u95ee\u9898 **Q1\uff1a\u8bbf\u95ee install.php \u663e\u793a 404 \u6216\u7a7a\u767d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-51","post","type-post","status-publish","format-standard","hentry","category-faq"],"_links":{"self":[{"href":"https:\/\/bbs.diuz.cn\/index.php?rest_route=\/wp\/v2\/posts\/51","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bbs.diuz.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bbs.diuz.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bbs.diuz.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bbs.diuz.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=51"}],"version-history":[{"count":2,"href":"https:\/\/bbs.diuz.cn\/index.php?rest_route=\/wp\/v2\/posts\/51\/revisions"}],"predecessor-version":[{"id":53,"href":"https:\/\/bbs.diuz.cn\/index.php?rest_route=\/wp\/v2\/posts\/51\/revisions\/53"}],"wp:attachment":[{"href":"https:\/\/bbs.diuz.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=51"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bbs.diuz.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=51"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bbs.diuz.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}