オンラインオフィス ONLYOFFICE

正確には、ONLYOFFICE Document Server。これが本体で、ONLYOFFICE Community ServerがUIとなる。今回、UIはNextCloudを用いているので、Document Serverのみをインストール。

こちらのインストールは公式サイトを参考にしたが、dockerを用いることで1行でインストール完了!やはりdockerは必須です。

Docker
Docker hub.docker.com
Docker
ONLYOFFICE Docs Community Edition für Docker auf einem lokalen Server installieren - ONLYOFFICEVersion 8.0.0
ONLYOFFICE Docs Community Edition für Docker auf einem lokalen Server installieren - ONLYOFFICE helpcenter.onlyoffice.com
ONLYOFFICE Docs Community Edition für Docker auf einem lokalen Server installieren - ONLYOFFICE

なお、インストールした後に、サーバーリスタート後の自動起動設定を忘れずに。

sudo docker update –restart=always [コンテナ名]

[コンテナ名]には

sudo docker ps -a

の出力のNAMES(一番末尾の情報)を記載する必要がある。

また、NextcloudでONLYOFFICEのアクセス設定を実施するためには、ONLYOFFICEがhttpsで接続できるようにする必要がある。

ということで、この方法が最適かどうかは不明だが、80ポートでVirtualHostを作成し、Let’s Encryptで関連ファイル自動作成。

で、ここではまった。上記でONLYOFFICEのssl用の.confファイルが自動作成されるのだが、このままだとnextcloudからONLYOFFICEへの接続自体は可能なのだが、エクセルなどのファイルが開けない。

Chromeブラウザの検証でエラーを分析するに、どうやら内部の処理にhttpsではなくhttpでアクセスしており、ファイルを取得できていないようだった。

そこで、Let’s Encryptで自動作成されたsslの.confファイルに下記の一文を追加したら解決した。

RequestHeader setifempty X-Forwarded-Proto https

以下のサイトを参考にしたが、うまくいかなければ文言を追加したり削除したりしていろいろ試してみる必要がある。

HOWTO - What to do for having Nextcloud / OnlyOffice on the same host?Hello to the Community, I will write here some tips you should know for having OnlyOffice working on the same host as your Nextcloud instance if you’re using APACHE2 as a WebServer. I didn’t find a tutorial about this case, they’re all speaking about Ngnix So what do you need first : Apache2 A working Nextcloud Instance with SSL Docker Some RAM in your computer I’m on a Debian/Ubuntu server. First of all lets enable the Apache modules you will need with some commands : a2enmod proxy a...
HOWTO - What to do for having Nextcloud / OnlyOffice on the same host? help.nextcloud.com
HOWTO - What to do for having Nextcloud / OnlyOffice on the same host?

一般的にはnginx-proxyを使ってVirtualHost設定するのだろうけど、今回は直接Apacheの.confファイル作成した。

どの方法が一番良いか、おいおい考えてみる。