Nginx設定檔簡單說明

WBOY
發布: 2016-08-08 09:27:28
原創
1015 人瀏覽過

設定檔(說明

user  nginx;nginx的運作帳號(). user nginx nginx表示使用者和群組worker_processes  

10;

工作進程數(worker),兩倍 worker_rlimit_nofile 100000; error_log數量error_log

   

/var/log/nginx/error.log;#error_log #error_log   /var/log/nginx/error.log  

info;pid         /var/run/nginx.pid_   1024;每個worker 程序允許的連線數    use epoll;網路

I/O kqueue }http {

    

include       /etc/nginx/mime.types;依照需求將不同的配置寫到不同的文件裡面    default_type  application/octet-stream;  te_user [$time_local] "$request" '                      '$status $         '$status $ body_bytes_sent "$http_referer" '                     

,格式名字設定為main

    access_log  /var/ log/nginx/access.log  main;access日誌檔案的路徑

, endfile        on; tcp_nopush      on;    tcp_nodelay    off;    gzip            

on;

    gzip_static     on;啟用HTTPGzipStaticp standard模組組中,rpm安裝帶了這個模組)    gzip_comp_level 5;壓縮等級,115

    

gzip_min_length 1024;壓縮的最小長度,小於此長度的不壓縮(此長度即header中的

  

65;    limit_zone    myzone  $binary_remote_addr  10m;    include /etc/nginx/conf.d/*.conf;     server {

        limit_conn   myzone listen       80;               #charset koi8-r;        #access_log  logs/host.access.log              root   /usr/share/nginx/html;主目錄            index  index.html index.htm;  以上就介紹了Nginx設定檔簡單說明,包含了方面的內容,希望對PHP教學有興趣的朋友有幫助。

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!