查看“︁A single server that handles both HTTP and HTTPS requests”︁的源代码
←
A single server that handles both HTTP and HTTPS requests
跳转到导航
跳转到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
==a single server that handles both HTTP and HTTPS requests== <pre> A single HTTP/HTTPS server It is possible to configure a single server that handles both HTTP and HTTPS requests: server { listen 80; listen 443 ssl; server_name www.example.com; ssl_certificate www.example.com.crt; ssl_certificate_key www.example.com.key; ... } </pre> ==强制跳转443== <pre> upstream proxy_node_nuxt_mobile { ip_hash; server 172.116.0.8:3334 weight=1 max_fails=2 fail_timeout=10s; server 172.116.0.14:3334 weight=1 max_fails=2 fail_timeout=10s ; } server { listen 80; server_name m..com; rewrite ^/(.*)$ https://m..com/$1 permanent; } server { listen 443 ssl; server_name m..com; #root /var/www/m..com; index index.html index.htm; #ssl on; ng 新的版本不能这样用了 ssl_certificate /var/package/ssl/om.crt; ssl_certificate_key /var/package/ssl/Skey; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; location / { # proxy_pass http://172.16.00.8:334; add_header X-Frame-Options SAMEORIGIN; proxy_pass http://proxy_node_nuxt_mobile; } error_log /var/log/nginx/m..error.log; access_log /var/log/nginx/m.caccess.log; # include /etc/nginx/sites-available/blockips.conf; } </pre> ==参考== http://nginx.org/en/docs/http/configuring_https_servers.html#single_http_https_server [[category:nginx]]
返回
A single server that handles both HTTP and HTTPS requests
。
导航菜单
个人工具
登录
命名空间
页面
讨论
大陆简体
查看
阅读
查看源代码
查看历史
更多
搜索
导航
首页
我的导航
关于我
shell
python
ops
linuxchina.net
blog.linuxchina
最近更改
随机页面
帮助
工具
链入页面
相关更改
特殊页面
页面信息