NGINX忽略单页的HTTPS

时间:2018-06-02 12:25:11

标签: ssl nginx nginx-location

我有一个可以直播的视频门户系统。问题是实时流是通过docker动态创建的,因此我无法轻松保护它们(HTTPS)。我需要一种方法告诉NGINX不要在{my_domain}/portal/{url_variable}保护(HTTP)单个页面,但要确保网站的其余部分是HTTPS。这是我目前的配置:

# FORGE CONFIG (DO NOT REMOVE!)
include forge-conf/app.domain.com/before/*;

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name app.domain.com;
root /home/forge/app.domain.com/public;

# FORGE SSL (DO NOT REMOVE!)
ssl_certificate /etc/nginx/ssl/app.domain.com/111111/server.crt;
ssl_certificate_key /etc/nginx/ssl/app.domain.com/111111/server.key;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'stuff';
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/nginx/dhparams.pem;

add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";

我尝试添加另一台侦听端口80的服务器,并仅将位置用于门户网站URL,但整个网站都不会呈现。

0 个答案:

没有答案