Giter VIP home page Giter VIP logo

Comments (6)

jamebal avatar jamebal commented on May 27, 2024

修改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.

userAmani avatar userAmani commented on May 27, 2024

修改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.

jamebal avatar jamebal commented on May 27, 2024

你不是用jc.sh脚本部署的吗

from jmal-cloud-view.

userAmani avatar userAmani commented on May 27, 2024

你不是用jc.sh脚本部署的吗

是在本地编译部署的,nginx配置了dcocker里的office服务但是Office预览有些问题,不知道什么解决了。

from jmal-cloud-view.

jamebal avatar jamebal commented on May 27, 2024

https://blog.jmal.top/s/deploy-jmalcloud
你看看这个,启动office服务后需要在nginx里面配置一下

from jmal-cloud-view.

userAmani avatar userAmani commented on May 27, 2024

https://blog.jmal.top/s/deploy-jmalcloud 你看看这个,启动office服务后需要在nginx里面配置一下

好的谢谢大佬

from jmal-cloud-view.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.