{"id":1336,"date":"2024-05-07T21:18:27","date_gmt":"2024-05-07T13:18:27","guid":{"rendered":"http:\/\/oneai.eu.org\/?p=1336"},"modified":"2024-05-08T09:37:39","modified_gmt":"2024-05-08T01:37:39","slug":"%e6%90%ad%e5%bb%bawordpress%e7%ab%99%e7%82%b9","status":"publish","type":"post","link":"https:\/\/oneai.eu.org\/?p=1336","title":{"rendered":"\u642d\u5efawordpress\u7ad9\u70b9"},"content":{"rendered":"\n<p>\u5982\u679c \u8981\u642d\u5efa\u591a\u76ee\u5f55\u7684\u7ad9\u70b9\uff1ahttps:\/\/www.wbolt.com\/wordpress-multisite.html<br>mysql\u5b89\u88c5\uff1ahttps:\/\/www.cnblogs.com\/angbors\/p\/17189610.html<br>\u53c2\u8003\uff1ahttps:\/\/cn.linux-console.net\/?p=1601#gsc.tab=0<br>\u9700\u8981\u4fee\u6539\u7684\u5730\u65b9 \u4e0b\u9762\u8fd9\u4e2a\u914d\u7f6e\u5373\u652f\u6301http,\u4e5f\u652f\u6301https \uff0c\u5982\u679c\u7528https,\u9996\u5148\u8981\u7533\u8bf7\u597d\u8bc1\u4e66<br>1\u3001 \/etc\/nginx\/conf.d\/aifamily.conf<br>server {<br>listen 443 ssl;<br>ssl_session_timeout 5m;<br>ssl_certificate \/etc\/nginx\/cert\/aifamily.cert;<br>ssl_certificate_key \/etc\/nginx\/cert\/aifamily.key;<br>ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;<br>ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;<br>ssl_prefer_server_ciphers on;<\/p>\n\n\n\n<p>server_name oneai.eu.org www.oneai.eu.org;<br>root \/var\/www\/html\/aifamily;<br>error_log \/var\/log\/nginx\/aifamily_error.log;<br>access_log \/var\/log\/nginx\/aifamily_access.log;<\/p>\n\n\n\n<p>location \/ {<br>index index.html index.htm index.php;<br>}<br>client_max_body_size 1024M;<br>location ~ .php$ {<br>include \/etc\/nginx\/fastcgi_params;<br>fastcgi_pass 127.0.0.1:9000;<br>fastcgi_index index.php;<br>fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br>}<br>}<\/p>\n\n\n\n<p>server {<br>listen 80;<br>server_name oneai.eu.org www.oneai.eu.org;<br>rewrite ^\/(.*) https:\/\/$server_name$request_uri? permanent;<br>}<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>2\u3001<br>vi \/etc\/php\/7.4\/fpm\/pool.d\/www.conf<\/p>\n\n\n\n<p>; The address on which to accept FastCGI requests.<br>; Valid syntaxes are:<br>; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on<br>; a specific port;<br>; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on<br>; a specific port;<br>; 'port' - to listen on a TCP socket to all addresses<br>; (IPv6 and IPv4-mapped) on a specific port;<br>; '\/path\/to\/unix\/socket' - to listen on a unix socket.<br>; Note: This value is mandatory.<br>; listen = \/run\/php\/php7.4-fpm.sock<br>listen = 127.0.0.1:9000<\/p>\n\n\n\n<p>; Set listen(2) backlog.<br>; Default Value: 511 (-1 on FreeBSD and OpenBSD)<br>;listen.backlog = 511<\/p>\n\n\n\n<p>; Set permissions for unix socket, if one is used. In Linux, read\/write<br>; permissions must be set in order to allow connections from a web server. Many<br>; BSD-derived systems allow connections regardless of permissions.<br>; Default Values: user and group are set as the running user<br>; mode is set to 0660<\/p>\n\n\n\n<p>3\u3001\u4e00\u5b9a\u8981\u653e\u5f00\u76f8\u5173\u7684\u5916\u7f51\u7aef\u53e3 80<\/p>\n\n\n\n<p>ngnix_web.conf \u53c2\u8003\uff1a<\/p>\n\n\n\n<p>server {<br>listen 80;<br>listen [::]:80;<br>server_name localhost aifamily;<br>root \/var\/www\/html\/aifamily;<br>index index.php index.html index.htm index.nginx-debian.html;<\/p>\n\n\n\n<p>location \/ {<br>autoindex on;<br>root \/var\/www\/html\/aifamily;<br>index index.html index.htm index.php;<br>try_files $uri $uri\/ \/index.php;<br>}<\/p>\n\n\n\n<p>location ~ ^\/wp-json\/ {<br>rewrite ^\/wp-json\/(.*?)$ \/?rest_route=\/$1 last;<br>}<\/p>\n\n\n\n<p>location ~* \/wp-sitemap.*.xml {<br>try_files $uri $uri\/ \/index.php$is_args$args;<br>}<\/p>\n\n\n\n<p>error_page 404 \/404.html;<br>error_page 500 502 503 504 \/50x.html;<\/p>\n\n\n\n<p>client_max_body_size 20M;<\/p>\n\n\n\n<p>location = \/50x.html {<br>root \/usr\/share\/nginx\/html;<br>}<\/p>\n\n\n\n<p>location ~ .php$ {<br>fastcgi_pass unix:\/run\/php\/php7.4-fpm.sock;<br>fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br>include fastcgi_params;<br>include snippets\/fastcgi-php.conf;<br>fastcgi_buffers 1024 4k;<br>fastcgi_buffer_size 128k;<\/p>\n\n\n\n<pre class=\"io-enlighter-pre\"><code class=\"gl\" data-enlighter-language=\"php\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"\" data-enlighter-highlight=\"\"># Add headers to serve security related headers\nadd_header X-Content-Type-Options nosniff;\nadd_header X-XSS-Protection \"1; mode=block\";\nadd_header X-Permitted-Cross-Domain-Policies none;\nadd_header X-Frame-Options \"SAMEORIGIN\";<\/code><\/pre>\n\n\n\n<p>}<\/p>\n\n\n\n<p>#enable gzip compression<br>gzip on;<br>gzip_vary on;<br>gzip_min_length 1000;<br>gzip_comp_level 5;<br>gzip_types application\/json text\/css application\/x-javascript application\/javascript image\/svg+xml;<br>gzip_proxied any;<\/p>\n\n\n\n<p># A long browser cache lifetime can speed up repeat visits to your page<br>location ~* .(jpg|jpeg|gif|png|webp|svg|woff|woff2|ttf|css|js|ico|xml)$ {<br>access_log off;<br>log_not_found off;<br>expires 360d;<br>}<br>}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c \u8981\u642d\u5efa\u591a\u76ee\u5f55\u7684\u7ad9\u70b9\uff1ahttps:\/\/www.wbolt.com\/wordpress-multisite.htmlmysql\u5b89\u88c5\uff1ahttps:\/\/www.cnblogs.com\/angbors\/p\/17189610.html\u53c2\u8003\uff1ahttps:\/\/cn.linux-console.net\/?p=1601#gsc.tab=0\u9700\u8981\u4fee\u6539\u7684\u5730\u65b9 \u4e0b\u9762\u8fd9\u4e2a\u914d\u7f6e\u5373\u652f\u6301http,\u4e5f\u652f\u6301https \uff0c\u5982\u679c\u7528https,\u9996\u5148\u8981\u7533\u8bf7\u597d\u8bc1\u4e661\u3001 \/etc\/nginx\/conf.d\/aifamily.confserver {listen 443 ssl;ssl_session_timeout 5m;ssl_certificate \/etc\/nginx\/cert\/aifamily.cert;ssl_certificate_key \/etc\/nginx\/cert\/aifamily.key;ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;ssl_prefer_server_ciphers on; server_name oneai.eu.org www.oneai.eu.org;root \/var\/www\/html\/aifamily;error_log \/var\/log\/nginx\/aifamily_error.log;access_log \/var\/log\/nginx\/aifamily_access.log; location \/ {index index.html index.htm index.php;}client_max_body_size 1024M;location ~ .php$ {include \/etc\/nginx\/fastcgi_params;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;}} server {listen 80;server_name oneai.eu.org www.oneai.eu.org;rewrite ^\/(.*) https:\/\/$server_name$request_uri? permanent;} 2\u3001vi \/etc\/php\/7.4\/fpm\/pool.d\/www.conf ; The address on which to accept FastCGI requests.; Valid syntaxes are:; &#8216;ip.add.re.ss:port&#8217; &#8211; to listen on a TCP socket to a specific IPv4 address on; a specific port;; &#8216;[ip:6:addr:ess]:port&#8217; &#8211; to listen on a TCP socket to a specific IPv6 address on; a specific port;; &#8216;port&#8217; &#8211; to listen on a TCP socket to all addresses; (IPv6 and IPv4-mapped) on a specific port;; &#8216;\/path\/to\/unix\/socket&#8217; &#8211; to listen on a unix socket.; Note: This value is mandatory.; listen = \/run\/php\/php7.4-fpm.socklisten = 127.0.0.1:9000 ; Set listen(2) backlog.; Default Value: 511 (-1 on FreeBSD and OpenBSD);listen.backlog = 511 ; Set permissions for unix socket, if one is used. In Linux, read\/write; permissions must be set in order to allow connections from a web server. Many; BSD-derived systems allow connections regardless of permissions.; Default Values: user and group are set as the running user; &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","footnotes":""},"categories":[99,9],"tags":[],"class_list":["post-1336","post","type-post","status-publish","format-standard","hentry","category-centos","category-9"],"_links":{"self":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/1336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1336"}],"version-history":[{"count":1,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/1336\/revisions"}],"predecessor-version":[{"id":1337,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/1336\/revisions\/1337"}],"wp:attachment":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}