nginx 프로필 소개
user www www; // ,user , nobody
worker_processes auto; // , nginx
error_log /home/wwwlogs/nginx_error.log crit; // , , crit
pid /usr/local/nginx/logs/nginx.pid; // , id
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200; // worker cpu
events //nginx
{
use epoll; // nginx select poll ,kqueue epoll
// epoll linux kqueue BSD 。 epoll 。
worker_connections 51200; // nginx , 1024
multi_accept on;
}
http
{
include mime.types; //
default_type application/octet-stream; //http
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;// headerbuffer
large_client_header_buffers 4 32k;//
client_max_body_size 50m; //
sendfile on; //
tcp_nopush on; //
keepalive_timeout 60; //
tcp_nodelay on; //
fastcgi_connect_timeout 300; // FastCGI
fastcgi_send_timeout 300; // FastCGI , FastCGI 。
fastcgi_read_timeout 300; // FastCGI , FastCGI 。
fastcgi_buffer_size 64k; // FastCGI , 1 64KB ( ), fastcgi_buffers 。
fastcgi_buffers 4 64k; // FastCGI 。 PHP
256KB, 4 64KB ; 256KB, 256KB
fastcgi_temp , , 。 PHP
, 256KB, “1616k”、“464k” 。
fastcgi_busy_buffers_size 128k; // fastcgi_buffers
fastcgi_temp_file_write_size 256k; // , fastcgi_buffers 。
#HttpGzip , 。
gzip on; //
gzip_min_length 1k; // 。
gzip_buffers 4 16k; // 16k 。
gzip_http_version 1.0; //http
gzip_comp_level 2; //gzip ,1 ,
gzip_types text/plain application/x-javascript text/css application/xml; //
gzip_vary on; // ,gzip
gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE [1-6]\.";
#limit_conn_zone $binary_remote_addr zone=perip:10m;
##If enable limit_conn_zone,add "limit_conn perip 10;" to server section.
server_tokens off;
#log format
//httplog , nginx 。
log_format access '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
#nginx
upstream www.lnmp.org
{
server 192.168.5.225:80;
server 192.168.5.226:80;
}
#
server
{
listen 80 default; //80 , default
#listen [::]:80 default ipv6only=on;
server_name // IP
index index.html index.htm index.php; //
root /home/wwwroot/default; //
#error_page 404 /404.html; //
location ~ [^/]\.php(/|$)
{
# comment try_files $uri =404; to enable pathinfo
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
#include pathinfo.conf;
}
location /nginx_status {
stub_status on;
access_log off;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ //
{
expires 30d; // 30
}
location ~ .*\.(js|css)?$ // .js .css
{
expires 12h; // 12
}
access_log /home/wwwlogs/access.log access; // access
}
include vhost/*.conf;
}
we
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.