[{"id":"bcb0874d-299b-448e-9552-9e9b25ef80dd","tags":[{"product":null,"links":null,"id":"ba7e818e-4f6b-4211-b1ac-58e3bafcf439","name":"\u66F4\u65B0","color":"orange","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"8ce3627e-9e58-471b-9133-4f135d191e7b","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"ae60ae59-34f5-4f32-a8eb-243ed1457543","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"3d4848c3-910f-4ffa-9153-60bb507334a9","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"133f4ca6-d951-4d65-a618-3dc6301266f7","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"de62ec1c-813e-40b1-8160-a4cd109afe64","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"2426c71d-8332-4cbd-a436-1ec4f8666464","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"2ce7b6b0-78aa-4e4b-bf8a-e4ba2f988298","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"4706db46-0811-4652-8f59-1e0a1da84758","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"8f1271bb-2cd9-4f39-9897-c15b239ee7ab","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"677e13a7-6f3e-449f-986c-2c3a26f8d54f","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"5e40f6dc-caec-49d7-a1d0-be65f06815ba","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"2457f0e0-9e71-4860-a87d-065e0fb84f84","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"d5c67fd0-1145-482c-9113-97b492c44c18","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"a609a8fa-ab91-4c1d-a1c3-d209d0463303","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"b4a9eb15-94e5-48df-b218-a24138f0cf9c","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]}]
系统安装完成后,默认已经可以使用局域网内的IP或域名访问。如果您需要通过反向代理进行 https 方式发布产品的话,请参考本页内容。
文中以使用 Nginx 1.14.2 为例介绍反向代理过程。
type=info
提示
使用 https 方式发布产品需要有效的域名和 SSL 证书,请您提前进行申请。
1. 由 Nginx 官网(http://nginx.org/)下载 Nginx 压缩包并解压至 Wyn 服务器的 C 盘根目录下。
2. 将 SSL 证书放置到服务器指定目录下,如下图所示。
3. 打开 Nginx 配置文件“ nginx.conf ”。该文件在 nginx 文件包的 conf 子文件夹中,本例中为 C:\nginx-1.14.2\conf。
4. 配置 nginx.conf 文件。请按照以下修改前后对比图修改文件中 HTTPS server 中的内容。
nginx.conf 配置文件修改前
nginx.conf 配置文件修改后
以下为配置文件中修改时使用的示例代码,请参考使用。
server {
listen 443 ssl;
server_name yourdomain.com.cn;
ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
ssl_certificate C://nginx-1.14.2//ssl//00000000.pem;
ssl_certificate_key C://nginx-1.14.2//ssl//000000000.key;
large_client_header_buffers 4 32k;
#error_page 504 //50x.html;
#location = //50x.html {
# root C://nginx-1.14.2//html;
# internal;
#}
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
location / {
proxy_pass http://localhost:51980;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
send_timeout 60s;
sendfile on;
proxy_buffer_size 64k;
proxy_buffers 32 32k;
proxy_busy_buffers_size 128k;
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
client_max_body_size 8M;
}
}
server {
listen 80;
server_name yourdomain.com.cn;
large_client_header_buffers 4 32k;
return 301 https://$host$request_uri;
}
type=warning
注意
当监听端口不是 80/443 时,需要将 nginx 配置中的
proxy_set_header Host $host;
修改为
proxy_set_header Host $host:$server_port;
5. 保存配置文件后,双击 nginx.exe 文件运行 Nginx。
type=info
提示
因为HTTPS默认使用443端口,所以需要添加入站规则,允许远程访问443端口。
有关开启端口的介绍,请参见如何设置防火墙规则(开放端口)。
如需将 Wyn 部署为子程序,另外还需更改 Wyn 的配置文件,添加子应用程序名。
该文件的位置如下:
• 标准版,Windows环境中它的默认路径为 C:\Program Files\Wyn\conf ,Linux环境下为 /opt/Wyn/conf/
• 集群版,Windows环境中它的默认路径为 C:\Program Files\Wyn\Monitor\conf ,Linux环境下为 /opt/Wyn/Monitor/conf/
type=info
提示
请将 Wyn.conf 文件备份后再进行修改操作,以备修改过程中对比内容或恢复文件时使用。
如需在原路径下进行修改,可使用管理员权限打开 Wyn.conf文件。
修改配置文件,在IdentityServerUrl 中以及添加如下图所示的“PathBase”,指定子应用程序名称。
配置文件修改完成后,重启 WynService 服务。
之后就可以使用反向代理中配置的域名加上在 Wyn.conf 中配置的子应用程序名称来访问站点。