nginx在本地的配置文件,参考一下
来源:互联网 发布:充值软件的骗局 编辑:程序博客网 时间:2024/06/02 04:20
#user nobody;
worker_processes 1;
#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_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 off;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
client_header_buffer_size 1k;
large_client_header_buffers 4 4k;
#设定负载均衡的服务器列表
upstream mysvr {
#weigth参数表示权值,权值越高被分配到的几率越大
#本机上的Squid开启3128端口
server 192.168.8.1:3128 weight=5;
server 192.168.8.2:80 weight=1;
server 192.168.8.3:80 weight=6;
}
server {
listen 80;
server_name localhost;
charset utf-8;
#access_log logs/host.access.log main;
location / {
root E:\xampp\htdocs\CodeIgniter;
index index.php index.html index.htm;
autoindex on;
}
#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 E:\xampp\htdocs\CodeIgniter;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$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;
# }
#}
}
0 0
- nginx在本地的配置文件,参考一下
- Nginx 配置文件 参考
- nginx 本地nginx.conf配置文件
- 结婚的参考一下
- docker映射window本地文件夹的nginx的虚拟主机配置文件vhost.nginx.conf
- linux中nginx 301重定向跳转方法总结,有需要的朋友可参考一下
- Nginx的配置文件nginx.conf
- 在nginx的配置文件中 判断浏览器然后重写
- nginx的配置文件
- 【转】nginx的配置文件
- Nginx的配置文件说明
- Nginx的配置文件解析
- nginx的配置文件
- nginx/tengine 的配置文件
- NGINX的配置文件解析
- NGINX 的配置文件说明
- Nginx的配置文件
- nginx日志的配置文件
- struts拦截器配置,以及全局的拦截器配置
- sublime text2快捷键
- dump文件生成的源码
- 微信开发中文字交互项目详解
- 3Sum
- nginx在本地的配置文件,参考一下
- .net 多Task放入一个LIST<Task> Loop
- 再来谈谈iOS的table view(动态高度计算)
- 关于UDP socket的一点小知识
- 1067 : 最近公共祖先·二
- HDU 4768 Flyer
- 严重: IOException while loading persisted sessions: java.io.EOFException
- iOS CALayer-实现颜色的渐变和曲线图
- 2012年5月SAT香港真题解析