Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #############################################
- # 這是 Nginx 服務的主要設定檔
- # 檔案位置預設為 /usr/local/etc/nginx/nginx.conf
- #############################################
- # 啟用程序的 Linux 帳戶
- user nginx;
- # 啟用的執行緒數量(建議為你的 CPU 核心數 x 2)
- worker_processes 2;
- # Error Log 檔的位置
- error_log logs/error.log;
- error_log logs/error.log notice;
- error_log logs/error.log info;
- pid logs/nginx.pid;
- events {
- # 允許同一時間連線總數量
- worker_connections 1024;
- }
- http {
- include mime.types;
- default_type application/octet-stream;
- # 預設的 log 記錄格式
- log_format main '$remote_addr - $remote_user [$time_local] "$request" '
- '$status $body_bytes_sent "$http_referer" '
- '"$http_user_agent" "$http_x_forwarded_for"';
- # Access log 檔的位置
- access_log logs/access.log main;
- sendfile on;
- #tcp_nopush on;
- #keepalive_timeout 0;
- keepalive_timeout 65;
- # 預設不會自動啟動 gzip 壓縮
- #gzip on;
- ** # 載入 /etc/nginx/conf.d/ 下的所有設定檔
- ** # 通常都是各個虛擬主機的配置
- ** include /etc/nginx/conf.d/*.conf;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement