nginx-1
来源:互联网 发布:新一代网络标准 编辑:程序博客网 时间:2024/06/04 23:20
nginx配置文件:nginx.conf
user admin admin; 用户
worker_processes 8; 8核cpu,起了8个workerworker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000;
error_log /export/servers/nginx/logs/nginx_error.log warn;
pid /export/servers/nginx/logs/nginx.pid; ningx的pid路径
worker_rlimit_nofile 65535;
events {
worker_connections 65535;
}
http {
include mime.types;
default_type application/octet-stream;
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 logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
include domains/*; 导入自定义的nginx配置文件
}
0 0
- [Nginx 1] Nginx简介
- nginx-1
- Nginx初步-1:架设Nginx服务器
- nginx 学习笔记(1) nginx安装
- Nginx学习(1):Nginx源码安装
- nginx+uwsgi+django - 1 安装nginx
- Nginx学习总结(1):Nginx简介
- Nginx学习总结(1):Nginx简介
- 图解Nginx-Nginx进程模型1
- Nginx学习(1)nginx安装
- nginx(1)Linux下安装nginx
- Nginx(1) Linux 快速安装,启动nginx
- nginx学习笔记1 nginx的安装
- nginx(1)linux系统安装nginx
- nginx优化1
- nginx研究笔记(1)
- konaha (1) nginx 配置
- nginx ngx_process 1
- 第十周-项目二-二叉树遍历的递归算法
- 指针注意事项
- 第八周项目4-字符串加密
- 第十周 项目3 利用二叉树遍历思想解决问题
- Git常用命令备忘
- nginx-1
- Python学习笔记 --- 编码问题
- lua和torch安装教程
- [IMX6Q]LCD LVDS driver 注册流程
- gcc编译选项
- C语言中的32个关键字
- 总结下Intent可以打开的系统项
- SAP ABAP 选择屏幕实现标签页
- 项目 6 - 模拟停车场