mirror of
https://gitee.com/niucloud-team/niucloud.git
synced 2025-12-11 01:22:49 +00:00
38 lines
1.7 KiB
Plaintext
38 lines
1.7 KiB
Plaintext
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';
|
||
# }
|
||
#}
|