Ngin 简单配置文件
2024-09-26 03:44:22
#user nobody;
worker_processes ; #error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info; #pid logs/nginx.pid; events {
worker_connections ;
} 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 ;
keepalive_timeout ; #gzip on; upstream ly.com{
server 192.168.1.211: weight=;
server 192.168.1.211: weight=;
server 192.168.1.211: weight=;
} server {
listen ;
server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / {
#root html;
#index index.html index.htm;
proxy_pass http://ly.com;
proxy_redirect default;
} location /status {
stub_status on;
access_log /nginx/logs/status.log;
auth_basic "NginxStatus";
} #error_page /.html; # redirect server error pages to the static page /50x.html
#
error_page /50x.html;
location = /50x.html {
root html;
} # proxy the PHP scripts to Apache listening on 127.0.0.1:
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:;
# 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 ;
# listen somename:;
# server_name somename alias another.alias; # location / {
# root html;
# index index.html index.htm;
# }
#} # HTTPS server
#
#server {
# listen 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;
# }
#} }
最新文章
- JAVA SSH 框架介绍
- mindmup-editabletable-编辑table的使用
- mapreduce 本地调试需要注意的问题
- Apache Common DbUtils
- Cobar使用文档(可用作MySQL大型集群解决方案)
- Python函数,参数,变量
- How to find and fix Bash Shell-shock vulnerability CVE-2014-6271 in unix like system
- iOS自定义发送消息输入框
- [设计模式]<;<;设计模式之禅>;>;模板方法模式
- 基于Cloudera Manager5配置HIVE压缩
- 【转】RTSP流理解
- A Simple Problem with Integers(100棵树状数组)
- PHP简易计算器方法2
- 我在网站开发中经常用到的几个js函数01
- UITableView 之 取消选中
- GoLang simple-project-demo-01
- 20181125第二章节总结part3
- 字符串数据结构模板/题单(后缀数组,后缀自动机,LCP,后缀平衡树,回文自动机)
- java框架之Spring(2)-注解配置IOC&;AOP配置
- oracle 之 基础操作