본문 바로가기
Tool/Nginx

[NGINX] 3-9. Configuration - Worker Processes

by 건빵거늬 2021. 12. 18.

cf-1. 바보개발님 블로그 먼저 보기

https://minholee93.tistory.com/entry/Nginx-Worker-Process?category=926406 

 

[Nginx] Worker Process

이전글에 이어서 Nginx의 configuartion에 대해 알아보도록 하겠습니다. 10. Worker Process nginx에서 실제로 작업을 수행하고 response를 return 하는 process는 master prcoess가 아닌 worker process입니다...

minholee93.tistory.com

1. nginx.conf 파일

user www-data;

worker_processes auto;

events {
  worker_connections 1024;
}

http {

  include mime.types;

  server {

    listen 80;
    server_name http://13.124.129.118/;

    root /sites/demo;

    index index.php index.html;

    location / {
      try_files $uri $uri/ =404;
    }

    location ~\.php$ {
      # Pass php requests to the php-fpm service (fastcgi)
      include fastcgi.conf;
      fastcgi_pass unix:/run/php-fpm/www.sock;
    }

  }
}

댓글