Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自己部署的不能双击打开office文件 #157

Open
fengdu126 opened this issue Sep 14, 2024 · 4 comments
Open

自己部署的不能双击打开office文件 #157

fengdu126 opened this issue Sep 14, 2024 · 4 comments

Comments

@fengdu126
Copy link

fengdu126 commented Sep 14, 2024

我看demo网站是可以双击打开excel或者word文件,请问下这个还需要什么特别配置吗?

Uploading image.png…

@jamebal
Copy link
Owner

jamebal commented Sep 15, 2024

只要docker-compose.yml里面包含了office, 并且启动后在网盘设置-OnlyOffice中填入JWT_SECRET即可

office: # Optional
    container_name: jmalcloud_office
    image: onlyoffice/documentserver:8.0.1
    environment:
      TZ: "Asia/Shanghai"
      JWT_SECRET: "my_secret"
    restart: unless-stopped

@jamebal
Copy link
Owner

jamebal commented Sep 17, 2024

外层nginx需要加上proxy_set_header Host $http_host;

location ^~ / {
    proxy_pass http://localhost:7070; 
    proxy_set_header Host $http_host; 
    proxy_set_header X-Real-IP $remote_addr; 
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
    proxy_set_header REMOTE-HOST $remote_addr; 
    proxy_set_header Upgrade $http_upgrade; 
    proxy_set_header Connection $http_connection; 
    proxy_set_header X-Forwarded-Proto $scheme; 
    proxy_http_version 1.1; 
    add_header X-Cache $upstream_cache_status; 
    add_header Cache-Control no-cache; 
    proxy_ssl_server_name off; 
    add_header Strict-Transport-Security "max-age=31536000"; 
}

@fengdu126
Copy link
Author

外层nginx需要加上proxy_set_header Host $http_host;

location ^~ / {
    proxy_pass http://localhost:7070; 
    proxy_set_header Host $http_host; 
    proxy_set_header X-Real-IP $remote_addr; 
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
    proxy_set_header REMOTE-HOST $remote_addr; 
    proxy_set_header Upgrade $http_upgrade; 
    proxy_set_header Connection $http_connection; 
    proxy_set_header X-Forwarded-Proto $scheme; 
    proxy_http_version 1.1; 
    add_header X-Cache $upstream_cache_status; 
    add_header Cache-Control no-cache; 
    proxy_ssl_server_name off; 
    add_header Strict-Transport-Security "max-age=31536000"; 
}

按照这个配置改了还是不行

@jamebal
Copy link
Owner

jamebal commented Sep 18, 2024

看看这个地址能打开office界面吗: http://ip:7070/office

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants