海运的博客

安装onlyoffice

发布时间:September 3, 2023 // 分类: // No Comments

docker run -i -t -d -p 80:80 --name onlyoffice --restart=always -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice  onlyoffice/documentserver
docker exec onlyoffice sudo supervisorctl start ds:example
docker exec onlyoffice sudo sed 's,autostart=false,autostart=true,' -i /etc/supervisor/conf.d/ds-example.conf
docker stop onlyoffice 
docker start onlyoffice 

nginx前端:

upstream docservice {
  server 192.168.1.2:80;
}
map $http_upgrade $proxy_connection {
  default upgrade;
  "" close;
}

server {
  listen 0.0.0.0:80;
  listen [::]:80;
  server_name office.haiyun.me;
  server_tokens off;
  return 301 https://$server_name$request_uri;
}

server {
  listen 0.0.0.0:443 ssl;
  listen [::]:443 ssl;
  server_name office.haiyun.me;
  server_tokens off;
  root /usr/share/nginx/html;

  ssl_certificate /var/acme/haiyun.me_ecc/fullchain.cer;
  ssl_certificate_key /var/acme/haiyun.me_ecc/haiyun.me.key;
  ssl_trusted_certificate /var/acme/haiyun.me_ecc/ca.cer;
  ssl_verify_client off;
  ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;
  ssl_session_cache  builtin:1000  shared:SSL:10m;
  ssl_prefer_server_ciphers   on;

  add_header X-Content-Type-Options nosniff;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection $proxy_connection;
  proxy_set_header X-Forwarded-Host $http_host;
  proxy_set_header X-Forwarded-Proto $scheme;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  location ~ ^/$ {
    return 301 https://$server_name/example/?lang=zh;
  }
  location / {
    proxy_pass http://docservice;
    proxy_http_version 1.1;
  }
  access_log /run/log/nginx/office.haiyun.me.log ssl;
  error_log  /run/log/nginx/office.haiyun.me_error.log;
}

标签:none

发表评论

分类
最新文章
最近回复
  • opnfense: 谢谢博主!!!解决问题了!!!我之前一直以为内置的odhcp6就是唯一管理ipv6的方式
  • liyk: 这个方法获取的IPv6大概20分钟之后就会失效,默认路由先消失,然后Global IPV6再消失
  • 海运: 不好意思,没有。
  • zongboa: 您好,請問一下有immortalwrt設定guest Wi-Fi的GUI教學嗎?感謝您。
  • 海运: 恩山有很多。
  • swsend: 大佬可以分享一下固件吗,谢谢。
  • Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
  • 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
  • 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
  • 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...