Page 81 - ระบบตัวแทนการให้บริการเว็บไซต์หน่วยงานสำนักงานพัฒนาที่ดินเขต (Reverse Proxy)
P. 81

ห้องสมุดกรมพัฒนาที่ดิน
                                                                                                      ก-1





                                                           ภาคผนวก



               ไฟล์ชุดคําสั่งหลักของโปรแกรม Nginx
               etc/nginx/ngnix.conf
               # For more information on configuration, see:
               #   * Official English Documentation: http://nginx.org/en/docs/
               * Official Russian Documentation: http://nginx.org/ru/docs/

               user webproxy;
               ชื่อผู้ใช้งานที่มีสิทธิเชื่อมโยงโปรแกรมกับระบบปฏิบัติการ
               worker_processes auto;

               pid /run/nginx.pid;
               # Load dynamic modules. See /usr/share/nginx/README.dynamic
               #  include /usr/share/nginx/modules/*.conf;
               events {
                   worker_connections 768;

               }
               http {
                server_tokens off;

               ปิดการแสดงผลเวอร์ชันของโปรแกรม
                   log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                                     '$status $body_bytes_sent "$http_referer" '
                                     '"$http_user_agent" "$http_x_forwarded_for"';

               การกําหนดรูปไฟล์ log ว่าเก็บข้อมูล log ใดบ้าง
                  access_log
               syslog:server=10.1.203.20:514,facility=local7,tag=ReverseWebProxy,severity=info;
               การกําหนดส่งค่า log ไปยัง centralized log  กรมพัฒนาที่ดิน

                   access_log  /var/log/nginx/nginx_log/access.log  main;
                   error_log   /var/log/nginx/nginx_log/error.log;
                   sendfile            on;
                   tcp_nopush          on;

                   tcp_nodelay         on;
                   types_hash_max_size 2048;
                   gzip            off;

               ## Size Limits & Buffer Overflows
               ## the size may be configured based on the needs.
                   client_header_buffer_size 1k;
   76   77   78   79   80   81   82   83   84   85   86