jp21
November 5, 2022, 8:17pm
1
I´m facing the following problems:
Dein Webserver ist nicht richtig konfiguriert, um “/.well-known/webfinger” aufzulösen. Weitere Informationen hierzu findest du in unserer Dokumentation .
Dein Webserver ist nicht richtig konfiguriert, um “/.well-known/nodeinfo” aufzulösen. Weitere Informationen hierzu findest du in unserer Dokumentation .
Dein Webserver ist nicht richtig konfiguriert, um “/.well-known/caldav” aufzulösen. Weitere Informationen hierzu findest du in unserer Dokumentation .
Dein Webserver ist nicht richtig konfiguriert, um “/.well-known/carddav” aufzulösen. Weitere Informationen hierzu findest du in unserer Dokumentation .
This is my system:
Nextcloud version Hub 3 (25.0.1
)
Operating system and version: Ubuntu, 22.04 LTS
Apache version: 2.4.52
PHP version: 8.1
Local system in a LAN
This way didn’t work for me:
Has anyone an idea how to solve this?
j-ed
November 7, 2022, 11:10am
2
Please have a look on existing threads on the forum which are covering your issue:
https://help.nextcloud.com/search?q=apache%20webfinger
jp21
November 7, 2022, 7:32pm
3
I’ve read and tried many things already but nothing worked for me, thats why I created this post here
bad wiki
try adding this to your website-ssl.conf
notice the mod_rewrite.c
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/\.well-known/carddav remote.php/dav [R=301,L]
RewriteRule ^/\.well-known/caldav remote.php/dav [R=301,L]
RewriteRule ^/\.well-known/webfinger index.php/.well-known/webfinger [R=301,L]
RewriteRule ^/\.well-known/nodeinfo index.php/.well-known/nodeinfo [R=301,L]
</IfModule>
and this should be in your mod_headers.c
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15768000; preload"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
# Prevent MIME based attacks
Header always set X-Content-Type-Options "nosniff"
Header always set X-Frame-Options "SAMEORIGIN"
</IfModule>
then enable module rewrite with
a2enmod rewrite; apache2ctl restart
jp21
November 8, 2022, 6:32pm
5
Vincent_Stans:
website-ssl.conf
where can I find this file?
/etc/apache2/sites-available/
if you have not set a personal one it’s most likely default-ssl.conf
jp21
November 8, 2022, 7:26pm
7
I just added the lines from above at the very end of the file, is that correct? Because it didn’t solve the problem
no it needs to be in the ssl module.
sample default-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost _default_:4443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html/>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
# line below is for http2
# Protocols h2 h2c http/1.1
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15768000; preload"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
# Prevent MIME based attacks
Header always set X-Content-Type-Options "nosniff"
Header always set X-Frame-Options "SAMEORIGIN"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/\.well-known/carddav remote.php/dav [R=301,L]
RewriteRule ^/\.well-known/caldav remote.php/dav [R=301,L]
RewriteRule ^/\.well-known/webfinger index.php/.well-known/webfinger [R=301,L]
RewriteRule ^/\.well-known/nodeinfo index.php/.well-known/nodeinfo [R=301,L]
</IfModule>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
</IfModule>
don’t copy all of this it’s just to show where to place it.
jp21
November 8, 2022, 8:31pm
9
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/\.well-known/carddav remote.php/dav [R=301,L]
RewriteRule ^/\.well-known/caldav remote.php/dav [R=301,L]
RewriteRule ^/\.well-known/webfinger index.php/.well-known/webfinger [R=301,L]
RewriteRule ^/\.well-known/nodeinfo index.php/.well-known/nodeinfo [R=301,L]
</IfModule>
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15768000; preload"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
# Prevent MIME based attacks
Header always set X-Content-Type-Options "nosniff"
Header always set X-Frame-Options "SAMEORIGIN"
</IfModule>
...
Thats how the file looks now, but without any effect
notice the DocumentRoot.
is your nextcloud installed in that directory or is it installed in a subfolder ex. /var/www/html/subfolder
if it is the later you need to add the subfolder in your rewrite module section just before index.php and remote.php
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/\.well-known/carddav /subfolder/remote.php/dav [R=301,L]
RewriteRule ^/\.well-known/caldav /subfolder/remote.php/dav [R=301,L]
RewriteRule ^/\.well-known/webfinger /subfolder/index.php/.well-known/webfinger [R=301,L]
RewriteRule ^/\.well-known/nodeinfo /subfolder/index.php/.well-known/nodeinfo [R=301,L]
</IfModule>
jp21
November 8, 2022, 9:06pm
11
I tried this too with no effect on the error message
jp21
November 9, 2022, 6:13pm
12
SOLUTION:
file:
/etc/apache2/sites-enabled/000-default.conf
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/\.well-known/carddav /remote.php/dav [R=301,L]
RewriteRule ^/\.well-known/caldav /remote.php/dav [R=301,L]
RewriteRule ^/\.well-known/webfinger /index.php/.well-known/webfinger [R=301,L]
RewriteRule ^/\.well-known/nodeinfo /index.php/.well-known/nodeinfo [R=301,L]
</IfModule>
@Vincent_Stans The difference is one slash
1 Like