I followed this tutorial: https://help.nextcloud.com/t/howto-ubuntu-docker-nextcloud-talk-collabora
It is a well written how-to but I might have messed something up while following it. I think my issue is a one off thing… The only thing I did different is that I am using Ubuntu 20.04 instead of 18.04.
Got everything working except office.mygood.url (not my real domain). When loading the webpage it shows the Apache2 default page instead of the office page. I have double checked in the config files and I do not know what I did wrong. I have them below.
Please help me if you can. I am relativly new to Apache.
Thank you in advance.
collabora.conf
<VirtualHost *:80>
ServerName office.mygood.url
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
AllowEncodedSlashes NoDecode
SSLProxyEngine On
SSLProxyVerify None
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerName Off
ProxyPreserveHost On
ProxyPass /loleaflet https://127.0.0.1:9980/loleaflet retry=0
ProxyPassReverse /loleaflet https://127.0.0.1:9980/loleaflet
ProxyPass /hosting/discovery https://127.0.0.1:9980/hosting/discovery retry=0
ProxyPassReverse /hosting/discovery https://127.0.0.1:9980/hosting/discovery
ProxyPassMatch "/lool/(.*)/ws$" wss://127.0.0.1:9980/lool/$1/ws nocanon
ProxyPass /lool/adminws wss://127.0.0.1:9980/lool/adminws
ProxyPass /lool https://127.0.0.1:9980/lool
ProxyPassReverse /lool https://127.0.0.1:9980/lool
ProxyPass /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities retry=0
ProxyPassReverse /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities
RewriteEngine on
RewriteCond %{SERVER_NAME} =office.mygood.url
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>
ServerName office.mygood.url
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
AllowEncodedSlashes NoDecode
SSLProxyEngine On
SSLProxyVerify None
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerName Off
ProxyPreserveHost On
ProxyPass /loleaflet https://127.0.0.1:9980/loleaflet retry=0
ProxyPassReverse /loleaflet https://127.0.0.1:9980/loleaflet
ProxyPass /hosting/discovery https://127.0.0.1:9980/hosting/discovery retry=0
ProxyPassReverse /hosting/discovery https://127.0.0.1:9980/hosting/discovery
ProxyPassMatch "/lool/(.*)/ws$" wss://127.0.0.1:9980/lool/$1/ws nocanon
ProxyPass /lool/adminws wss://127.0.0.1:9980/lool/adminws
ProxyPass /lool https://127.0.0.1:9980/lool
ProxyPassReverse /lool https://127.0.0.1:9980/lool
ProxyPass /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities retry=0
ProxyPassReverse /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities
SSLCertificateFile /etc/letsencrypt/live/cloudmygood.url/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/cloudmygood.url/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
nextcloud.conf
<VirtualHost *:80>
ServerName cloud.mygood.url
ErrorLog ${APACHE_LOG_DIR}/nextcloud-error.log
CustomLog ${APACHE_LOG_DIR}/nextcloud-access.log combined
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
RewriteEngine On
RewriteRule ^/\.well-known/carddav http://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
RewriteRule ^/\.well-known/caldav http://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
RewriteCond %{SERVER_NAME} =cloud.mygood.url
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>
ServerName cloud.mygood.url
ErrorLog ${APACHE_LOG_DIR}/nextcloud-error.log
CustomLog ${APACHE_LOG_DIR}/nextcloud-access.log combined
SSLEngine On
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
RewriteEngine On
RewriteRule ^/\.well-known/carddav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
RewriteRule ^/\.well-known/caldav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
SSLCertificateFile /etc/letsencrypt/live/cloudmygood.url/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/cloudmygood.url/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
catchall.conf
<VirtualHost *:80>
RedirectMatch permanent ^/(.*)$ https://www.bing.com
ErrorLog ${APACHE_LOG_DIR}/catchall-error.log
CustomLog ${APACHE_LOG_DIR}/catchall-access.log combined
</VirtualHost>
<VirtualHost _default_:443>
RedirectMatch permanent ^/(.*)$ https://www.bing.com
ErrorLog ${APACHE_LOG_DIR}/catchall-error.log
CustomLog ${APACHE_LOG_DIR}/catchall-access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
</VirtualHost>
Results of “sudo apachectl -S”
VirtualHost configuration:
*:80 is a NameVirtualHost
default server cloud.mygood.url (/etc/apache2/sites-enabled/010-nextcloud.conf:1)
port 80 namevhost cloud.mygood.url (/etc/apache2/sites-enabled/010-nextcloud.conf:1)
port 80 namevhost office.mygood.url (/etc/apache2/sites-enabled/011-collabora.conf:1)
port 80 namevhost Name (/etc/apache2/sites-enabled/999-catchall.conf:1)
*:443 is a NameVirtualHost
default server cloud.mygood.url (/etc/apache2/sites-enabled/010-nextcloud.conf:15)
port 443 namevhost cloud.mygood.url (/etc/apache2/sites-enabled/010-nextcloud.conf:15)
port 443 namevhost office.mygood.url (/etc/apache2/sites-enabled/011-collabora.conf:26)
port 443 namevhost Name (/etc/apache2/sites-enabled/999-catchall.conf:7)