niucloud/docker-compose/test.niucloud.com.conf
2024-01-30 18:42:25 +08:00

38 lines
1.7 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

server {
listen 80;
server_name test.niucloud.cn;
location / {
#proxy_redirect off;
proxy_pass http://127.0.0.1:8011/; # 转发
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
}
}
# listen 443 ssl; #SSL协议访问端口号为443。此处如未添加ssl可能会造成Nginx无法启动。
# server_name test.niucloud.com; #将test.niucloud.com修改为您证书绑定的域名例如www.niucloud.com。
# index index.php index.html index.htm;
# ssl_certificate test.niucloud.com.pem; #将domain name.pem替换成您证书的全路径。
# ssl_certificate_key test.niucloud.com.key; #将domain name.key替换成您证书的密钥文件全路径。
# ssl_session_timeout 5m;
# ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; #使用此加密套件。
# ssl_protocols TLSv1.2; #使用该协议进行配置。
# ssl_prefer_server_ciphers on;
# access_log /path/test.niucloud.com.443.access.log; # 将domain替换成您配置的域名将path替换成您的实际路径
# location / {
# proxy_redirect off;
# proxy_pass http://127.0.0.1:8011/; # 转发
# proxy_set_header Host $host;
# proxy_set_header X-Real_IP $remote_addr;
# proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection 'upgrade';
# }
#}