{"id":33183,"date":"2023-10-15T03:58:32","date_gmt":"2023-03-06T14:20:33","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-fedora21-%e4%b8%8a%e5%ae%89%e8%a3%85-nginx\/"},"modified":"2024-05-04T04:16:30","modified_gmt":"2024-05-03T20:16:30","slug":"%e5%9c%a8-fedora21-%e4%b8%8a%e5%ae%89%e8%a3%85-nginx","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-fedora21-%e4%b8%8a%e5%ae%89%e8%a3%85-nginx\/","title":{"rendered":"\u5728 Fedora21 \u4e0a\u5b89\u88c5 nginx"},"content":{"rendered":"<p>\u5728 Fedora 21 Workstation \u4e0a\uff0c\u901a\u8fc7 yum \u5b89\u88c5 nginx\u3002<\/p>\n<h2>\u7528Yum\u8fdb\u884c\u5b89\u88c5<\/h2>\n<pre class=\"post-pre\"><code>\r\n<span class=\"gp\">#<\/span> yum <span class=\"nb\">install <\/span>nginx\r\n<\/code><\/pre>\n<p>\u203b\u622a\u6b62\u81f32015\u5e742\u67087\u65e5\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\u6709nginx.x86_64 1:1.6.2-4.fc21\u3002<\/p>\n<h2>\u5b89\u88c5\u540e\u7684\u8bbe\u7f6e<\/h2>\n<p>\u5b89\u88c5\u540e\uff0c\u670d\u52a1\u5c06\u5904\u4e8e\u505c\u6b62\u72b6\u6001\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">[root@fedora ~]#<\/span> systemctl status nginx\r\n<span class=\"go\">\u25cf nginx.service - The nginx HTTP and reverse proxy server\r\n<\/span><span class=\"gp\">   Loaded: loaded (\/usr\/lib\/systemd\/system\/nginx.service;<\/span> disabled<span class=\"o\">)<\/span>\r\n<span class=\"go\">   Active: inactive (dead)\r\n<\/span><span class=\"gp\">[root@fedora ~]#<\/span> \r\n<\/code><\/pre>\n<p>\u8a2d\u5b9a\u6a94\u6848\u4f4d\u65bc \/etc\/nginx\/nginx.conf\u3002<\/p>\n<blockquote><p>\u4ece\/etc\/nginx\/conf.d\u76ee\u5f55\u4e2d\u52a0\u8f7d\u6a21\u5757\u5316\u914d\u7f6e\u6587\u4ef6\u3002\u6709\u5173\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605http:\/\/nginx.org\/en\/docs\/ngx_core_module.html#include\u3002\u5305\u62ec\/etc\/nginx\/conf.d\/*.conf;<\/p><\/blockquote>\n<p>\u6839\u636e\u60c5\u51b5\uff0c\u5728 \/etc\/nginx\/conf.d \u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a conf \u6587\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"k\">server<\/span> <span class=\"p\">{<\/span>\r\n    <span class=\"kn\">listen<\/span>       <span class=\"mi\">81<\/span><span class=\"p\">;<\/span>  <span class=\"c1\">#\u2190nginx.conf\u306b\u66f8\u304b\u308c\u305f\u8a2d\u5b9a\u304c80\u306e\u305f\u3081\u3001\u5225\u30dd\u30fc\u30c8\u3092\u6307\u5b9a<\/span>\r\n    <span class=\"kn\">server_name<\/span>  <span class=\"s\">localhost<\/span><span class=\"p\">;<\/span>\r\n\r\n    <span class=\"kn\">location<\/span> <span class=\"n\">\/<\/span> <span class=\"p\">{<\/span>\r\n        <span class=\"kn\">root<\/span>   <span class=\"n\">\/home\/aznprpr\/eclipsework<\/span><span class=\"p\">;<\/span>  <span class=\"c1\">#\u2190\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u6307\u5b9a<\/span>\r\n        <span class=\"kn\">index<\/span>  <span class=\"s\">index.html<\/span> <span class=\"s\">index.htm<\/span><span class=\"p\">;<\/span>\r\n    <span class=\"p\">}<\/span>\r\n\r\n    <span class=\"kn\">error_page<\/span>   <span class=\"mi\">500<\/span> <span class=\"mi\">502<\/span> <span class=\"mi\">503<\/span> <span class=\"mi\">504<\/span>  <span class=\"n\">\/50x.html<\/span><span class=\"p\">;<\/span>\r\n    <span class=\"kn\">location<\/span> <span class=\"p\">=<\/span> <span class=\"n\">\/50x.html<\/span> <span class=\"p\">{<\/span>\r\n        <span class=\"kn\">root<\/span>   <span class=\"n\">\/usr\/share\/nginx\/html<\/span><span class=\"p\">;<\/span>\r\n    <span class=\"p\">}<\/span>\r\n\r\n    <span class=\"kn\">location<\/span> <span class=\"p\">~<\/span> <span class=\"sr\">\/\\.ht<\/span> <span class=\"p\">{<\/span>\r\n        <span class=\"kn\">deny<\/span>  <span class=\"s\">all<\/span><span class=\"p\">;<\/span>\r\n    <span class=\"p\">}<\/span>\r\n<span class=\"p\">}<\/span>\r\n<\/code><\/pre>\n<p>\u5b8c\u6210\u540e\uff0c\u8bf7\u786e\u8ba4\u662f\u5426\u4e3a\u6b63\u786e\u7684\u63cf\u8ff0\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">[root@fedora conf.d]#<\/span> nginx <span class=\"nt\">-t<\/span>\r\n<span class=\"go\">nginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\r\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful\r\n<\/span><span class=\"gp\">[root@fedora conf.d]#<\/span> \r\n<\/code><\/pre>\n<h2>\u670d\u52a1\u542f\u52a8\u5931\u8d25<\/h2>\n<p>\u7576\u8a66\u5716\u555f\u52d5\u670d\u52d9\u6642\uff0c\u767c\u751f\u4e86\u5931\u6557\u7684\u60c5\u6cc1\u3002<\/p>\n<pre class=\"post-pre\"><code>\r\n<span class=\"gp\">root@fedora conf.d]#<\/span> systemctl start nginx\r\n<span class=\"go\">Job for nginx.service failed. See \"systemctl status nginx.service\" and \"journalctl -xe\" for details.\r\n<\/span><\/code><\/pre>\n<p>\u6839\u636e\u7559\u8a00\u5185\u5bb9\uff0c\u786e\u8ba4\u8be6\u7ec6\u60c5\u51b5\u3002<\/p>\n<pre class=\"post-pre\"><code>\r\n<span class=\"gp\">[root@fedora conf.d]#<\/span> systemctl status nginx.service\r\n<span class=\"go\">\u25cf nginx.service - The nginx HTTP and reverse proxy server\r\n<\/span><span class=\"gp\">   Loaded: loaded (\/usr\/lib\/systemd\/system\/nginx.service;<\/span> disabled<span class=\"o\">)<\/span>\r\n<span class=\"gp\">   Active: failed (Result: exit-code) since \u571f 2015-02-07 21:30:13 JST;<\/span> 16s ago\r\n<span class=\"go\">  Process: 5086 ExecStartPre=\/usr\/sbin\/nginx -t (code=exited, status=1\/FAILURE)\r\n\r\n 2\u6708 07 21:30:13 fedora.local nginx[5086]: nginx: the configuration file \/e...k\r\n 2\u6708 07 21:30:13 fedora.local systemd[1]: nginx.service: control process ex...1\r\n 2\u6708 07 21:30:13 fedora.local systemd[1]: Failed to start The nginx HTTP an....\r\n 2\u6708 07 21:30:13 fedora.local systemd[1]: Unit nginx.service entered failed....\r\n 2\u6708 07 21:30:13 fedora.local systemd[1]: nginx.service failed.\r\n 2\u6708 07 21:30:13 fedora.local nginx[5086]: nginx: [emerg] open() \"\/run\/ngin...)\r\n 2\u6708 07 21:30:13 fedora.local nginx[5086]: nginx: configuration file \/etc\/n...d\r\nHint: Some lines were ellipsized, use -l to show in full.\r\n<\/span><span class=\"gp\">[root@fedora conf.d]#<\/span> \r\n<span class=\"gp\">[root@fedora conf.d]#<\/span> \r\n<span class=\"gp\">[root@fedora conf.d]#<\/span> journalctl <span class=\"nt\">-xe<\/span>\r\n<span class=\"go\">-- \r\n-- The result is failed.\r\n 2\u6708 07 21:30:13 fedora.local systemd[1]: Unit nginx.service entered failed state\r\n 2\u6708 07 21:30:13 fedora.local systemd[1]: nginx.service failed.\r\n 2\u6708 07 21:30:13 fedora.local nginx[5086]: nginx: [emerg] open() \"\/run\/nginx.pid\"\r\n 2\u6708 07 21:30:13 fedora.local nginx[5086]: nginx: configuration file \/etc\/nginx\/n\r\n 2\u6708 07 21:29:39 fedora.local vlc.desktop[2204]: TagLib: MPEG::Header::parse() --2\u6708 07 21:29:39 fedora.local vlc.desktop[2204]: TagLib: MPEG::Header::parse() --2\u6708 07 21:29:39 fedora.local vlc.desktop[2204]: TagLib: MPEG::Header::parse() --2\u6708 07 21:29:39 fedora.local vlc.desktop[2204]: TagLib: MPEG::Header::parse() --2\u6708 07 21:29:39 fedora.local vlc.desktop[2204]: TagLib: MPEG::Header::parse() --2\u6708 07 21:29:39 fedora.local vlc.desktop[2204]: TagLib: MPEG::Header::parse() --2\u6708 07 21:29:39 fedora.local vlc.desktop[2204]: TagLib: MPEG::Header::parse() --2\u6708 07 21:29:39 fedora.local vlc.desktop[2204]: TagLib: MPEG::Header::parse() --2\u6708 07 21:29:39 fedora.local vlc.desktop[2204]: TagLib: MPEG::Header::parse() --2\u6708 07 21:29:39 fedora.local vlc.desktop[2204]: TagLib: MPEG::Header::parse() --2\u6708 07 21:29:39 fedora.local vlc.desktop[2204]: TagLib: MPEG::Header::parse() --2\u6708 07 21:30:13 fedora.local nginx[5086]: nginx: the configuration file \/etc\/ngi2\u6708 07 21:30:13 fedora.local dbus[744]: [system] Activating service name='org.fe2\u6708 07 21:30:13 fedora.local systemd[1]: nginx.service: control process exited, 2\u6708 07 21:30:13 fedora.local systemd[1]: Failed to start The nginx HTTP and reve- Subject: Unit nginx.service has failed\r\n-- Defined-By: systemd\r\n-- Support: http:\/\/lists.freedesktop.org\/mailman\/listinfo\/systemd-devel\r\n-- \r\n-- Unit nginx.service has failed.\r\n 2\u6708 07 21:30:14 fedora.local dbus[744]: [system] Successfully activated service \r\n 2\u6708 07 21:30:14 fedora.local setroubleshoot[5092]: SELinux is preventing nginx  2\u6708 07 21:30:13 fedora.local systemd[1]: nginx.service failed.\r\n 2\u6708 07 21:30:13 fedora.local nginx[5086]: nginx: [emerg] open() \"\/run\/nginx.pid\"\r\n 2\u6708 07 21:30:13 fedora.local nginx[5086]: nginx: configuration file \/etc\/nginx\/n\r\n 2\u6708 07 21:30:14 fedora.local dbus[744]: [system] Successfully activated service \r\n 2\u6708 07 21:30:14 fedora.local setroubleshoot[5092]: SELinux is preventing nginx f\r\n 2\u6708 07 21:30:14 fedora.local python[5092]: SELinux is preventing nginx from 'rea\r\n\r\n                                             *****  Plugin catchall (100. confid\r\n\r\n                                             If you believe that nginx should be\r\n                                             Then you should report this as a bu\r\n                                             You can generate a local policy mod\r\n                                             Do\r\n                                             allow this access for now by execut\r\n<\/span><span class=\"gp\">                                             #<\/span> <span class=\"nb\">grep <\/span>nginx \/var\/log\/audit\/audit.l\r\n<span class=\"gp\">                                             #<\/span> semodule <span class=\"nt\">-i<\/span> mypol.pp\r\n<span class=\"go\">\r\n 2\u6708 07 21:31:35 fedora.local google-chrome.desktop[2524]: Fontconfig error: Cann\r\n 2\u6708 07 21:31:35 fedora.local google-chrome.desktop[2524]: [2524:2563:0207\/213135\r\n 2\u6708 07 21:31:51 fedora.local google-chrome.desktop[2524]: [2524:2563:0207\/213151\r\n<\/span><span class=\"gp\">[root@fedora conf.d]#<\/span> \r\n\r\n<\/code><\/pre>\n<p>\u4e0d\u77e5\u4e3a\u4f55\uff0c\u6211\u5bf9SELinux\u6709\u4e9b\u6000\u7591<br \/>\n\u5728\u542f\u52a8\u65f6\u5f39\u51fa\u4e86\u4e00\u4e2a\u5f39\u7a97&#8230;<\/p>\n<p>\u5f53\u6211\u5c1d\u8bd5\u542f\u52a8SELinux\u901a\u77e5\u6d4f\u89c8\u5668\u65f6\uff0c\u6211\u53d1\u73b0\u4e86\u4e24\u4e2a\u7528\u4e8e\u6545\u969c\u6392\u9664\u7684\u547d\u4ee4\uff0c\u6211\u5c1d\u8bd5\u7740\u8f93\u5165\u4e86\u5b83\u4eec\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">root@fedora conf.d]#<\/span> <span class=\"nb\">grep <\/span>nginx \/var\/log\/audit\/audit.log | audit2allow <span class=\"nt\">-M<\/span> mypol\r\n<span class=\"go\">******************** IMPORTANT ***********************\r\nTo make this policy package active, execute:\r\n\r\nsemodule -i mypol.pp\r\n\r\n<\/span><span class=\"gp\">[root@fedora conf.d]#<\/span> \r\n<span class=\"gp\">[root@fedora conf.d]#<\/span> semodule <span class=\"nt\">-i<\/span> mypol.pp\r\n<span class=\"gp\">[root@fedora conf.d]#<\/span> \r\n<\/code><\/pre>\n<h2>\u670d\u52a1\u7684\u542f\u52a8<\/h2>\n<p>\u518d\u6b21\u5c1d\u8bd5\u542f\u52a8<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">[root@fedora conf.d]#<\/span> systemctl start nginx\r\n<span class=\"gp\">[root@fedora conf.d]#<\/span> \r\n<span class=\"gp\">[root@fedora conf.d]#<\/span> \r\n<span class=\"gp\">[root@fedora conf.d]#<\/span> systemctl status nginx\r\n<span class=\"go\">\u25cf nginx.service - The nginx HTTP and reverse proxy server\r\n<\/span><span class=\"gp\">   Loaded: loaded (\/usr\/lib\/systemd\/system\/nginx.service;<\/span> disabled<span class=\"o\">)<\/span>\r\n<span class=\"gp\">   Active: active (running) since \u571f 2015-02-07 21:54:20 JST;<\/span> 17s ago\r\n<span class=\"go\">  Process: 8475 ExecStart=\/usr\/sbin\/nginx (code=exited, status=0\/SUCCESS)\r\n  Process: 8472 ExecStartPre=\/usr\/sbin\/nginx -t (code=exited, status=0\/SUCCESS)\r\n Main PID: 8478 (nginx)\r\n   CGroup: \/system.slice\/nginx.service\r\n           \u251c\u25008478 nginx: master process \/usr\/sbin\/nginx\r\n           \u2514\u25008479 nginx: worker process\r\n\r\n 2\u6708 07 21:54:20 fedora.local nginx[8472]: nginx: the configuration file \/e...k\r\n 2\u6708 07 21:54:20 fedora.local nginx[8472]: nginx: configuration file \/etc\/n...l\r\nHint: Some lines were ellipsized, use -l to show in full.\r\n<\/span><span class=\"gp\">[root@fedora conf.d]#<\/span> \r\n<\/code><\/pre>\n<p>\u65e0\u4e8b\u6210\u529f\u542f\u52a8<\/p>\n<h2>\u8ff7\u4e0a\u4e86<\/h2>\n<p>\u5f53\u4f7f\u7528\u6d4f\u89c8\u5668\u8bbf\u95eelocalhost:81\u65f6\uff0c\u4f1a\u51fa\u73b0403\u7981\u6b62\u8bbf\u95ee\u7684\u60c5\u51b5\u3002<br \/>\n\u8fd9\u662f\u56e0\u4e3a\u6211\u5c06\u7528\u6237\u76ee\u5f55\u4e0b\u7684Eclipse\u5de5\u4f5c\u7a7a\u95f4\u8bbe\u7f6e\u4e3a\u6587\u6863\u6839\u76ee\u5f55\uff0c<br \/>\n\u6240\u4ee5\u6211\u63d0\u524d\u5c06\u6574\u4e2a\u76ee\u5f55\u6743\u9650\u66f4\u6539\u4e3a755\u3002<\/p>\n<p>\u7136\u800c\uff0c\u67e5\u770b\u65e5\u5fd7\u53d1\u73b0\u4f3c\u4e4e\u662f\u6743\u9650\u62d2\u7edd\u4e86&#8230; &#8216;\u00e9r, sh\u00ec &#8230;)<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">[root@fedora conf.d]#<\/span> <span class=\"nb\">cat<\/span> \/var\/log\/nginx\/error.log \r\n<span class=\"go\">\uff08\u7565\uff09\r\n<\/span><span class=\"gp\">2015\/02\/07 22:07:10 [error] 8479#<\/span>0: <span class=\"k\">*<\/span>9 open<span class=\"o\">()<\/span> <span class=\"s2\">\"\/home\/aznprpr\/eclipsework\/adminpage\/about.html\"<\/span> failed <span class=\"o\">(<\/span>13: Permission denied<span class=\"o\">)<\/span>, client: 127.0.0.1, server: localhost, request: <span class=\"s2\">\"GET \/adminpage\/about.html HTTP\/1.1\"<\/span>, host: <span class=\"s2\">\"localhost:81\"<\/span>\r\n<span class=\"gp\">2015\/02\/07 22:07:11 [error] 8479#<\/span>0: <span class=\"k\">*<\/span>9 open<span class=\"o\">()<\/span> <span class=\"s2\">\"\/home\/aznprpr\/eclipsework\/favicon.ico\"<\/span> failed <span class=\"o\">(<\/span>13: Permission denied<span class=\"o\">)<\/span>, client: 127.0.0.1, server: localhost, request: <span class=\"s2\">\"GET \/favicon.ico HTTP\/1.1\"<\/span>, host: <span class=\"s2\">\"localhost:81\"<\/span>\r\n<span class=\"gp\">[root@fedora conf.d]#<\/span> \r\n<\/code><\/pre>\n<p>\u867d\u7136\u6ca1\u6709\u7f51\u7ad9\u56fe\u6807\uff0c\u4f46\u662f\u4e3a\u4ec0\u4e48\u2026<\/p>\n<p>\u5f53\u6211\u5c1d\u8bd5\u641c\u7d22\u65f6\uff0c\u7684\u786e\u53d1\u73b0\u7528\u6237\u76ee\u5f55\u672c\u8eab\u7684\u6743\u9650\u4e5f\u662f\u5fc5\u8981\u7684\uff0c\u8fd9\u662f\u4e00\u4e2a\u4ee4\u4eba\u60ca\u8bb6\u7684\u76f2\u70b9&#8230;<\/p>\n<p>\u5c06\u7528\u6237\u76ee\u5f55\u672c\u8eab\u7684\u6743\u9650\u8bbe\u7f6e\u4e3a755\uff0c\u518d\u6b21\u8bbf\u95ee\uff0c\u60c5\u51b5\u6ca1\u6709\u6539\u53d8\u3002\uff08\u56e0\u4e3a\u6211\u5728\u5f00\u53d1\u673a\u4e0a\u5ffd\u7565\u4e86\u5b89\u5168\u95ee\u9898\uff0c\u6240\u4ee5\u53ef\u4ee5\u505a\u8fd9\u6837\u7684\u8bbe\u7f6e\uff09<\/p>\n<h2>\u4f60\u53c8\u6765\u4e86<\/h2>\n<p>\u5f53\u6211\u67e5\u770bSELinux\u901a\u77e5\u4e2d\u5fc3\u65f6\uff0c\u53d1\u73b0\u4e86\u6709\u5173nginx\u7684\u53e6\u4e00\u4e2a\u901a\u77e5&#8230;<br \/>\n\u56e0\u6b64\u6211\u6267\u884c\u4e86\u5176\u4e2d\u63d0\u5230\u7684\u65b0\u547d\u4ee4\u3002<\/p>\n<pre class=\"post-pre\"><code>\r\n<span class=\"gp\">[root@fedora conf.d]#<\/span> setsebool <span class=\"nt\">-P<\/span> httpd_read_user_content 1\r\n\r\n<\/code><\/pre>\n<p>\u9a8c\u8bc1\u9875\u9762\u663e\u793a\u7ed3\u679c\u3002<\/p>\n<p>\u5f88\u957f\u65f6\u95f4\u4e86\u2026 &#8230;)<\/p>\n<p>\u6211\u89c9\u5f97\u7981\u7528SELinux\u4f1a\u4f7f\u5f00\u53d1\u53d8\u5f97\u66f4\u8f7b\u677e\u3002<\/p>\n<h2>\u8bf7\u53c2\u8003\u6b64\u9875\u9762\u3002<\/h2>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Nginx\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u57fa\u672c\u8a2d\u5b9a<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">CentOS 6.5\u3067nginx\u3092\u52d5\u304b\u3059\u70ba\u306e\u6700\u4f4e\u9650\u306e\u8a2d\u5b9a<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">nginx\u9023\u8f094\u56de\u76ee: nginx\u306e\u8a2d\u5b9a\u3001\u305d\u306e2 &#8211; \u30d0\u30fc\u30c1\u30e3\u30eb\u30b5\u30fc\u30d0\u306e\u8a2d\u5b9a<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">CentOS7\u3067\u306e\u30b5\u30fc\u30d3\u30b9\uff08\u30c7\u30fc\u30e2\u30f3\uff09\u306e\u8d77\u52d5\u30fb\u505c\u6b62\u65b9\u6cd5<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">CentOS\u3067Apache\u3067403\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u539f\u56e0<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Fedora 21 Workstation \u4e0a\uff0c\u901a\u8fc7 yum \u5b89\u88c5 nginx\u3002 \u7528Yum\u8fdb\u884c\u5b89\u88c5 # y [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-33183","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5728 Fedora21 \u4e0a\u5b89\u88c5 nginx - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5728-fedora21-\u4e0a\u5b89\u88c5-nginx\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728 Fedora21 \u4e0a\u5b89\u88c5 nginx\" \/>\n<meta property=\"og:description\" content=\"\u5728 Fedora 21 Workstation \u4e0a\uff0c\u901a\u8fc7 yum \u5b89\u88c5 nginx\u3002 \u7528Yum\u8fdb\u884c\u5b89\u88c5 # y [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5728-fedora21-\u4e0a\u5b89\u88c5-nginx\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-06T14:20:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-03T20:16:30+00:00\" \/>\n<meta name=\"author\" content=\"\u65b0, \u97f5\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u65b0, \u97f5\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-fedora21-%e4%b8%8a%e5%ae%89%e8%a3%85-nginx\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-fedora21-%e4%b8%8a%e5%ae%89%e8%a3%85-nginx\/\",\"name\":\"\u5728 Fedora21 \u4e0a\u5b89\u88c5 nginx - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-03-06T14:20:33+00:00\",\"dateModified\":\"2024-05-03T20:16:30+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-fedora21-%e4%b8%8a%e5%ae%89%e8%a3%85-nginx\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-fedora21-%e4%b8%8a%e5%ae%89%e8%a3%85-nginx\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-fedora21-%e4%b8%8a%e5%ae%89%e8%a3%85-nginx\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5728 Fedora21 \u4e0a\u5b89\u88c5 nginx\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\",\"name\":\"\u65b0, \u97f5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"caption\":\"\u65b0, \u97f5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-fedora21-%e4%b8%8a%e5%ae%89%e8%a3%85-nginx\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5728 Fedora21 \u4e0a\u5b89\u88c5 nginx - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u5728-fedora21-\u4e0a\u5b89\u88c5-nginx\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5728 Fedora21 \u4e0a\u5b89\u88c5 nginx","og_description":"\u5728 Fedora 21 Workstation \u4e0a\uff0c\u901a\u8fc7 yum \u5b89\u88c5 nginx\u3002 \u7528Yum\u8fdb\u884c\u5b89\u88c5 # y [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5728-fedora21-\u4e0a\u5b89\u88c5-nginx\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-03-06T14:20:33+00:00","article_modified_time":"2024-05-03T20:16:30+00:00","author":"\u65b0, \u97f5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u65b0, \u97f5","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-fedora21-%e4%b8%8a%e5%ae%89%e8%a3%85-nginx\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-fedora21-%e4%b8%8a%e5%ae%89%e8%a3%85-nginx\/","name":"\u5728 Fedora21 \u4e0a\u5b89\u88c5 nginx - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-03-06T14:20:33+00:00","dateModified":"2024-05-03T20:16:30+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-fedora21-%e4%b8%8a%e5%ae%89%e8%a3%85-nginx\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-fedora21-%e4%b8%8a%e5%ae%89%e8%a3%85-nginx\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-fedora21-%e4%b8%8a%e5%ae%89%e8%a3%85-nginx\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5728 Fedora21 \u4e0a\u5b89\u88c5 nginx"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9","name":"\u65b0, \u97f5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","caption":"\u65b0, \u97f5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8-fedora21-%e4%b8%8a%e5%ae%89%e8%a3%85-nginx\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/33183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=33183"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/33183\/revisions"}],"predecessor-version":[{"id":96061,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/33183\/revisions\/96061"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=33183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=33183"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=33183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}