Comments (6)
修改nginx配置文件即可:
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
map $http_host $this_host {
"" $host;
default $http_host;
}
map $http_x_forwarded_proto $the_scheme {
default $http_x_forwarded_proto;
"" $scheme;
}
map $http_x_forwarded_host $the_host {
default $http_x_forwarded_host;
"" $this_host;
}
server
{
listen 80;
server_name cloud1.jmal.top;
rewrite ^(.*) https://cloud1.jmal.top$1 permanent;
}
server {
listen 443 ssl;
server_name cloud1.jmal.top;
ssl_certificate /www/server/panel/vhost/cert/cloud1.jmal.top/fullchain.pem;
ssl_certificate_key /www/server/panel/vhost/cert/cloud1.jmal.top/privkey.pem;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
location / {
proxy_pass http://localhost:12070/;
proxy_redirect http:// $scheme://;
proxy_http_version 1.1;
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-PORT $remote_port;
proxy_set_header X-Forwarded-Proto $the_scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header Scheme $scheme;
proxy_set_header Server-Protocol $server_protocol;
proxy_set_header Server-Name $server_name;
proxy_set_header Server-Addr $server_addr;
proxy_set_header Server-Port $server_port;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
location /file/ {
proxy_pass http://localhost:12070/file/;
proxy_redirect http:// $scheme://;
proxy_http_version 1.1;
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-PORT $remote_port;
proxy_set_header X-Forwarded-Host $the_host/file;
proxy_set_header X-Forwarded-Proto $the_scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header Scheme $scheme;
proxy_set_header Server-Protocol $server_protocol;
proxy_set_header Server-Name $server_name;
proxy_set_header Server-Addr $server_addr;
proxy_set_header Server-Port $server_port;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
from jmal-cloud-view.
修改nginx配置文件即可:
map $http_upgrade $connection_upgrade { default upgrade; '' close; } map $http_host $this_host { "" $host; default $http_host; } map $http_x_forwarded_proto $the_scheme { default $http_x_forwarded_proto; "" $scheme; } map $http_x_forwarded_host $the_host { default $http_x_forwarded_host; "" $this_host; } server { listen 80; server_name cloud1.jmal.top; rewrite ^(.*) https://cloud1.jmal.top$1 permanent; } server { listen 443 ssl; server_name cloud1.jmal.top; ssl_certificate /www/server/panel/vhost/cert/cloud1.jmal.top/fullchain.pem; ssl_certificate_key /www/server/panel/vhost/cert/cloud1.jmal.top/privkey.pem; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; location / { proxy_pass http://localhost:12070/; proxy_redirect http:// $scheme://; proxy_http_version 1.1; proxy_set_header X-real-ip $remote_addr; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-PORT $remote_port; proxy_set_header X-Forwarded-Proto $the_scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header Scheme $scheme; proxy_set_header Server-Protocol $server_protocol; proxy_set_header Server-Name $server_name; proxy_set_header Server-Addr $server_addr; proxy_set_header Server-Port $server_port; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; } location /file/ { proxy_pass http://localhost:12070/file/; proxy_redirect http:// $scheme://; proxy_http_version 1.1; proxy_set_header X-real-ip $remote_addr; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-PORT $remote_port; proxy_set_header X-Forwarded-Host $the_host/file; proxy_set_header X-Forwarded-Proto $the_scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header Scheme $scheme; proxy_set_header Server-Protocol $server_protocol; proxy_set_header Server-Name $server_name; proxy_set_header Server-Addr $server_addr; proxy_set_header Server-Port $server_port; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; } }
好的谢谢,我本地开发环境运行前端和后端功能都正常,但是文档预览不了,Office预览的服务我也可以使用吗,我用docker起的office服务发现使用不了,可以解答下吗
from jmal-cloud-view.
你不是用jc.sh脚本部署的吗
from jmal-cloud-view.
你不是用jc.sh脚本部署的吗
是在本地编译部署的,nginx配置了dcocker里的office服务但是Office预览有些问题,不知道什么解决了。
from jmal-cloud-view.
https://blog.jmal.top/s/deploy-jmalcloud
你看看这个,启动office服务后需要在nginx里面配置一下
from jmal-cloud-view.
https://blog.jmal.top/s/deploy-jmalcloud 你看看这个,启动office服务后需要在nginx里面配置一下
好的谢谢大佬
from jmal-cloud-view.
Related Issues (20)
- v2.8.3上传压缩包报错 HOT 13
- Docker compose部署时 会自建存储卷 有必要映射吗? HOT 2
- v2.8.3又出现复制下载链接找不到地址 HOT 5
- 搜索状态下,进入文件夹报错了
- 保存有问题,内容无法保存
- 建议上传文件和文件夹同名重复的有个提示
- 建议分配权限中增加挂载到我的云盘操作权限 HOT 1
- 有客户端嘛,未来会考虑实现实时同步的功能嘛 HOT 2
- MD文档不能预览吗 HOT 2
- 两点非常有竞争力的功能完善建议 HOT 3
- 关于WebDAV的使用问题 HOT 2
- 建议上传存储的文件名称进行加密处理 HOT 1
- 这份文件无法保存。请检查连接设置或联系您的管理员。 HOT 5
- 下载文件夹提示所选文件夹为空 HOT 4
- webDAV 根据您提供的https方案似乎没有效果 HOT 11
- 请问采用DOCKER方式来部署,想使用MYSQL数据库,应该怎么设置变量呢? HOT 1
- 临时存储
- 文档安全令牌的格式不正确,请与您的文档服务器管理员联系。 HOT 1
- 优化建议:添加从docker env获取配置信息功能 HOT 2
- 博客地址跳转错误 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jmal-cloud-view.