win上配置nginx
2021-04-22 23:28
标签:pem 127.0.0.1 time bucket oca eal str 需要 header win上配置nginx 网上配置nginx的教程大多都是linux上的,今天贴出来nginx在win上的配置,在此篇配置中,nginx代理了Tomcat以及node服务。配置如下: 注意:根据实际经验来看,在win上修改完成nginx之后,需要将nginx的所有服务都关闭,然后重启,否则,只是一味的reload则服务并不会生效。 win上配置nginx 标签:pem 127.0.0.1 time bucket oca eal str 需要 header 原文地址:http://www.cnblogs.com/DonaHero/p/8000072.html#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 51200;
}
http {
include mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 96;
#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;
#node服务端口
upstream baidu.xxx.com{
server 127.0.0.1:9919;
}
#tomcat服务端口
upstream xinlang.xxx.com{
server 127.0.0.1:8080;
}
server {
listen 80;
server_name baidu.xxx.com ;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
proxy_pass http://127.0.0.1:9919;
}
}
server {
listen 80;
server_name xianlang.xxx.com ;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
index index.html index.jsp;
proxy_pass http://xinlang.xxx.com ;
proxy_set_header X-Real-IP $remote_addr;
client_max_body_size 100m;
}
}
# 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;
# }
#}
}
上一篇:fiddler 无法安装https证书问题 unable to configure windows to trust the fiddler root certificate
下一篇:winform 船体最大化事件