2020年5月21日木曜日

nginx x phpfpm(設定メモ)



以下を追加する。

[sample]
------------------------------------------------------------------------------------------------
 server {
          listen 80;
          server_name localhost;
          access_log /var/log/nginx/access.log main;
          error_log /var/log/nginx/error.log;
          root /var/www/html;

          location / {
          index index.php index.html index.htm;
          }

              location ~ \.php$ {
              fastcgi_pass 127.0.0.1:9000;
              fastcgi_index index.php;
              fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
              include fastcgi_params;
              }
          }
}
-------------------------------------------------------------------------------------------------

サービスの確認を行う。
systemctl restart nginx


vi /etc/php-fpm.d/www.conf


0 件のコメント:

コメントを投稿

terraform(moved.tf)のリソース名の修正方法について

以下の赤枠を直接変えてしまうと、ec2が削除されてしまいます。 これを維持したい場合について記載します。 以下に moved.tf ファイルを作成します。 以下のように、 from に修正前で、 to に修正したい内容を記載します。 以下のリソースにも修正を加えます。 terra...