{"id":521,"date":"2020-08-10T19:29:48","date_gmt":"2020-08-10T10:29:48","guid":{"rendered":"https:\/\/eng.miteel.net\/?page_id=521"},"modified":"2024-10-14T20:41:46","modified_gmt":"2024-10-14T11:41:46","slug":"nginx-%e4%bd%bf%e7%94%a8%e3%81%ae%e9%9a%9b%e3%81%ae%e6%b3%a8%e6%84%8f%e7%82%b9","status":"publish","type":"page","link":"https:\/\/eng.miteel.net\/?page_id=521","title":{"rendered":"nginx \u4f7f\u7528\u306e\u969b\u306e\u6ce8\u610f\u70b9"},"content":{"rendered":"\n<p>\u2460\u3000php \u3092 cgi\u3068\u3057\u3066\u52d5\u4f5c\u3055\u305b\u308b\u65b9\u6cd5<\/p>\n\n\n\n<p>\u3000php-fpm \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u9808<\/p>\n\n\n\n<p>\u3000\u3000\u3000apt install php-fpm<\/p>\n\n\n\n<p>\u3000\u3000php &#8211;version<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u78ba\u8a8d\nls \/var\/run\/php\/<\/code><\/pre>\n\n\n\n<p>\u3000\u3000&#8221;php7.4-fpm.sock&#8221; \u306e\u3088\u3046\u306a\u540d\u79f0\u3068\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u78ba\u8a8d\u3059\u308b<br>\n\u3000\u3000\u5f8c\u307b\u3069\u3001\u3053\u308c\u3092\u30d5\u30eb\u30d1\u30b9\u3067\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nginx \u306eConfig \u3092\u7de8\u96c6\u3059\u308b\n\nvi \/etc\/nginx\/sites-available\/default\n\n\n\u7de8\u96c6\u3059\u308b\u7b87\u6240\u306f\u3000server{ }  \u306e\u4e2d\u8eab<\/code><\/pre>\n\n\n\n<p>===================================================================<br>\n    server_name tkz.miteel.net;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>index index.php index.html index.htm index.nginx-debian.html;\n\nlocation ~ \\.php$ {\n    include snippets\/fastcgi-php.conf;\n    fastcgi_pass unix:\/var\/run\/php\/php7.4-fpm.sock;\n}\n===================================================================\n<\/code><\/pre>\n\n\n\n<p>\u7de8\u96c6\u304c\u6b63\u5e38\u306b\u884c\u308f\u308c\u305f\u304b\u5426\u304b\u306e\u78ba\u8a8d\u65b9\u6cd5<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> nginx -t<\/code><\/pre>\n\n\n\n<p>\u7de8\u96c6\u306e\u53cd\u6620<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> service nginx reload<\/code><\/pre>\n\n\n\n<p>\u2461\u3000Wordpress \u5b9f\u88c5\u6642\u306e\u6ce8\u610f<\/p>\n\n\n\n<p>\u3000\u3000\u30d1\u30fc\u30de\u30ea\u30f3\u30af\u3092\u4f7f\u308f\u306a\u3044\u5834\u5408\u3001\u305d\u306e\u307e\u307e\u3067\u3088\u3044<\/p>\n\n\n\n<p>\u3000\u3000\u30d1\u30fc\u30de\u30ea\u30f3\u30af\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5358\u4f4d\u3067\u306e\u8a2d\u5b9a<br>\n\u3000\u3000\u304c\u5fc5\u8981<\/p>\n\n\n\n<p>\u3000\u4ee5\u4e0b\u3000server {} \u5185\u306b\u8ffd\u52a0\u3059\u308b<br>\n\u3000\u203b\u3000\u30b5\u30f3\u30d7\u30eb\u3067\u306f\u3000root \u3068\u3000\/miteel \u306b\u30b5\u30a4\u30c8\u304c\u3042\u308b\u5834\u5408\u3092\u60f3\u5b9a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>location \/ {\n  try_files $uri $uri\/ \/index.php?$args;\n}\nlocation \/miteel {\n  try_files $uri $uri\/ \/miteel\/index.php?$args;\n}<\/code><\/pre>\n\n\n\n<p>\u2462\u3000php\u306e\u307fAlias\u3067\u52d5\u4f5c\u3055\u305b\u308b\u5834\u5408<BR>\n\u203b\u3000\u4e00\u5ea6\u5931\u6557\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u306b\u3088\u308a\u3001\u8a2d\u5b9a\u306e\u5909\u66f4\u304c\u53cd\u6620\u3055\u308c\u306a\u3044\u5834\u5408\u304c\u3042\u308b\u306e\u3067\u6ce8\u610f!!!!\n<\/p>\n\n\n\n<p><pre class=\"wp-block-code\"><code>\n        location \/ivs {\n                alias '\/usr2\/share1\/ivs\/www\/';\n                autoindex on;\n                autoindex_exact_size off;\n                autoindex_localtime on;\n                # charset shift-jis;\n                charset UTF-8;\n           location ~ \\.php$ {\n               include snippets\/fastcgi-php.conf;\n               fastcgi_pass unix:\/run\/php\/php8.1-fpm.sock;\n               fastcgi_param SCRIPT_FILENAME $request_filename;\n           }\n        }\n<\/code><\/pre><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u2460\u3000php \u3092 cgi\u3068\u3057\u3066\u52d5\u4f5c\u3055\u305b\u308b\u65b9\u6cd5 \u3000php-fpm \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u9808 \u3000\u3000\u3000apt install php-fpm \u3000\u3000php &#8211;version \u3000\u3000&#8221;php7.4-fpm &hellip; <a href=\"https:\/\/eng.miteel.net\/?page_id=521\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">nginx \u4f7f\u7528\u306e\u969b\u306e\u6ce8\u610f\u70b9<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":485,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-521","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/eng.miteel.net\/index.php?rest_route=\/wp\/v2\/pages\/521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eng.miteel.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/eng.miteel.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/eng.miteel.net\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/eng.miteel.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=521"}],"version-history":[{"count":9,"href":"https:\/\/eng.miteel.net\/index.php?rest_route=\/wp\/v2\/pages\/521\/revisions"}],"predecessor-version":[{"id":1189,"href":"https:\/\/eng.miteel.net\/index.php?rest_route=\/wp\/v2\/pages\/521\/revisions\/1189"}],"up":[{"embeddable":true,"href":"https:\/\/eng.miteel.net\/index.php?rest_route=\/wp\/v2\/pages\/485"}],"wp:attachment":[{"href":"https:\/\/eng.miteel.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}