{"id":1224,"date":"2022-02-20T23:50:42","date_gmt":"2022-02-20T15:50:42","guid":{"rendered":"http:\/\/www.tra56.com\/?p=1224"},"modified":"2022-02-20T23:50:52","modified_gmt":"2022-02-20T15:50:52","slug":"1224","status":"publish","type":"post","link":"https:\/\/www.tra56.com\/1224.html","title":{"rendered":"\u5206\u4eab\u51e0\u4e2anginx\u914d\u7f6e\u6587\u4ef6(\u6ca1\u6709fpm\u914d\u7f6e)"},"content":{"rendered":"
\u5355swoole\u53cd\u5411\u4ee3\u7406\u914d\u7f6e
<\/p>\n
server<\/code><\/div>\n{<\/code><\/div>\n <\/code>listen 80;<\/code><\/div>\n <\/code>server_name \u57df\u540d(\u7a7a\u683c\u5206\u9694\u53ef\u591a\u4e2a);<\/code><\/div>\n <\/div>\n <\/code>location ~ ^\/(\\.user.ini|\\.htaccess|\\.git|\\.svn|\\.project|LICENSE|README.md)<\/code><\/div>\n <\/code>{<\/code><\/div>\n <\/code>return<\/code> 404;<\/code><\/div>\n <\/code>}<\/code><\/div>\n <\/code>client_max_body_size 20m;<\/code><\/div>\n <\/code>location \/ {<\/code><\/div>\n <\/code>proxy_pass_request_body on;<\/code><\/div>\n <\/code>proxy_pass_request_headers on;<\/code><\/div>\n <\/code>proxy_pass \u4ee3\u7406\u5730\u5740:\u7aef\u53e3\u53f7;<\/code><\/div>\n <\/code>proxy_http_version 1.1;<\/code><\/div>\n <\/code>proxy_set_header Upgrade $http_upgrade;<\/code># \u652f\u6301ws<\/code><\/div>\n <\/code>proxy_set_header Connection <\/code>"Upgrade"<\/code>;<\/code>#\u652f\u6301ws<\/code><\/div>\n <\/code>}<\/code><\/div>\n}<\/code><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\nssl swoole\u53cd\u5411\u4ee3\u7406<\/p>\n
\n\n\n\n1<\/div>\n2<\/div>\n3<\/div>\n4<\/div>\n5<\/div>\n6<\/div>\n7<\/div>\n8<\/div>\n9<\/div>\n10<\/div>\n11<\/div>\n12<\/div>\n13<\/div>\n14<\/div>\n15<\/div>\n16<\/div>\n17<\/div>\n18<\/div>\n19<\/div>\n20<\/div>\n21<\/div>\n22<\/div>\n23<\/div>\n24<\/div>\n25<\/div>\n26<\/div>\n27<\/div>\n28<\/div>\n29<\/div>\n30<\/div>\n31<\/div>\n32<\/div>\n33<\/div>\n<\/td>\n\nserver<\/code><\/div>\n{<\/code><\/div>\n <\/code>listen 443 ssl http2;<\/code><\/div>\n <\/code>server_name \u57df\u540d;<\/code><\/div>\n <\/div>\n <\/code>ssl_certificate <\/code>\/ssl<\/code>.pem\u8bc1\u4e66\u5730\u5740;<\/code><\/div>\n <\/code>ssl_certificate_key <\/code>\/ssl<\/code>.key\u8bc1\u4e66key\u5730\u5740;<\/code><\/div>\n <\/code>ssl_protocols TLSv1 TLSv1.1 TLSv1.2;<\/code><\/div>\n <\/code>ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;<\/code><\/div>\n <\/code>ssl_prefer_server_ciphers on;<\/code><\/div>\n <\/code>ssl_session_cache shared:SSL:10m;<\/code><\/div>\n <\/code>ssl_session_timeout 10m;<\/code><\/div>\n <\/div>\n <\/code>location ~ ^\/(\\.user.ini|\\.htaccess|\\.git|\\.svn|\\.project|LICENSE|README.md)<\/code><\/div>\n <\/code>{<\/code><\/div>\n <\/code>return<\/code> 404;<\/code><\/div>\n <\/code>}<\/code><\/div>\n <\/code>client_max_body_size 20m;<\/code><\/div>\n <\/code>location \/ {<\/code><\/div>\n <\/code>proxy_pass \u4ee3\u7406\u5730\u5740:\u7aef\u53e3\u53f7;<\/code><\/div>\n <\/code>proxy_http_version 1.1;<\/code><\/div>\n <\/code>proxy_set_header Upgrade $http_upgrade;<\/code><\/div>\n <\/code>proxy_set_header Connection <\/code>"Upgrade"<\/code>;<\/code><\/div>\n <\/code>}<\/code><\/div>\n}<\/code><\/div>\n <\/div>\nserver {<\/code><\/div>\n <\/code>listen 80;<\/code><\/div>\n <\/code>server_name \u57df\u540d;<\/code><\/div>\n <\/code>location \/ {<\/code><\/div>\n <\/code>rewrite ^\/(.*)$ https:<\/code>\/\/<\/code>\u57df\u540d\/$1 permanent;<\/code>##\u7531http\u81ea\u52a8\u8df3\u8f6c\u5230https<\/code><\/div>\n <\/code>}<\/code><\/div>\n}<\/code><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\nvue\u4ee3\u7406\u7f51\u7ad9
<\/p>\n
\n\n\n\n1<\/div>\n2<\/div>\n3<\/div>\n4<\/div>\n5<\/div>\n6<\/div>\n7<\/div>\n8<\/div>\n9<\/div>\n10<\/div>\n11<\/div>\n12<\/div>\n13<\/div>\n14<\/div>\n15<\/div>\n16<\/div>\n17<\/div>\n18<\/div>\n19<\/div>\n20<\/div>\n21<\/div>\n22<\/div>\n23<\/div>\n24<\/div>\n25<\/div>\n26<\/div>\n27<\/div>\n28<\/div>\n29<\/div>\n<\/td>\n\nserver<\/code><\/div>\n{<\/code><\/div>\n