[SOLVED] Suspected Apache Guidance Needed: Web app errors

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

[SOLVED] Suspected Apache Guidance Needed: Web app errors

Postby xboxboy » May 30th, '22, 09:07

Continuing on with my nextcloud repair/migration, I have some errors that require attention. Yes, I'm aware that nextcloud is in the repos, but I've been burnt previously with web apps when performing OS updates: This is why I prefer to manually manage such a web app, and TBF the packagers go through hell with this PHP update/uprgrade stuff.

Due to me attempting to repair a crashed install, I've messed around more than I should, but I believe it's still salvageable.

I intend to run more than 1 web app on this machine, hence nextcloud being installed in a sub directory of the webserver root. I'm not sure if this means I should have set up a virtual host or not. I have not set up a virtual host.

I have the classic four warnings that I wish to fix first:

Code: Select all
  Your web server is not properly set up to resolve "/.well-known/webfinger". Further information can be found in the documentation ↗.

    Your web server is not properly set up to resolve "/.well-known/nodeinfo". Further information can be found in the documentation ↗.

    Your web server is not properly set up to resolve "/.well-known/caldav". Further information can be found in the documentation ↗.

    Your web server is not properly set up to resolve "/.well-known/carddav". Further information can be found in the documentation ↗.


I have Apache/2.4.53

Webserver root is, as per Mageia default.

Code: Select all
/var/www/html


I have the nextcloud html directory at:

Code: Select all
/srv/data/FamilyCloud/NextCloudHTML


With a symbolic link from webserver, subdirectory:

Code: Select all
/var/www/html/FamilyCloud


the 'directory/link'

Code: Select all
lrwxrwxrwx 1 apache apache      37 Dec 31 14:40 FamilyCloud -> /srv/data/FamilyCloud/NextCloudHTML/


As per nextcloud docs, I copied the .htaccess file from /srv/data/FamilyCloud/NextCloudHTML/.htaccess to the webserver root at /var/www/html/.htaccess

As per the documents, I added the following to the bottom of that .htaccess

Code: Select all
<IfModule mod_rewrite.c>
RewriteEngine on
             RewriteRule ^\.well-known/carddav /FamilyCloud/remote.php/dav [R=301,L]
             RewriteRule ^\.well-known/caldav /FamilyCloud/remote.php/dav [R=301,L]
             RewriteRule ^\.well-known/webfinger /FamilyCloud/index.php/.well-known/webfinger [R=301,L]
             RewriteRule ^\.well-known/nodeinfo /FamilyCloud/index.php/.well-known/nodeinfo [R=301,L]
</IfModule>


When I visit
Code: Select all
my.lan.ip.addy/FamilyCloud/remote.php/dav


the address is accepted, and I get

This is the WebDAV interface. It can only be accessed by WebDAV clients such as the Nextcloud desktop sync client.

As I'd expect: So it appears the DAV side of the install is all OK.

And when I visit

Code: Select all
my.lan.ip.addy/FamilyCloud/index.php/.well-known/carddav


I get some diagnostic/data page with "message" carddav not supported

Same for caldav, webfinger and nodeinfo

So I assume the nextcloud diagnostic is correct, and the address isn't being resolved correctly: Although it does make me wonder if that's not the issue, and I have a problem with carddav/caldav/webfinger/nodeinfo, given when I go to those addresses the browser reports they're not supported.

I also will need to fix/repair my attempt at forcing https only, I have a memory cache warning that comes and goes which shouldn't be too hard to fix (i have before on another install), and the last warning is

Code: Select all
The "Strict-Transport-Security" HTTP header is not set to at least "15552000" seconds. For enhanced security, it is recommended to enable HSTS as described in the security tips ↗.


And, I've also fixed that once previously too: So it really is just the four initial warnings that are driving me crazy.

The web app seems to be fine once logged in, so I doubt it's broken beyond repair. I can see files, move around the menu etc. I just really would like/need to fix these last errors.

Any help most appreciated. Many thanks.
Last edited by xboxboy on Jun 1st, '22, 15:32, edited 1 time in total.
xboxboy
 
Posts: 401
Joined: Jun 2nd, '13, 06:41

Re: Suspected Apache Guidance Needed: Web app errors

Postby xboxboy » Jun 1st, '22, 14:50

Well I've got it sorted:
I updated the web app, and copied the NEW .htaccess file into /var/www/html, and modifed that as per the documents: Taa-daa, it works.

Now I've backed up the working .htaccess file: but given it's outside the web app directory, I doubt the in app updater knows how to update it: Does anyone know if I can create a link from the webserver root, up to the updated .htaccess file that gets installed when the app updates??
xboxboy
 
Posts: 401
Joined: Jun 2nd, '13, 06:41

Re: [SOLVED] Suspected Apache Guidance Needed: Web app error

Postby filip » Jun 10th, '22, 17:16

I guess you can link to it but I don't think most of tha webapp will update it.
I prefer diff programs like Meld or something like that to manually implement changes.
filip
 
Posts: 478
Joined: May 4th, '11, 22:10
Location: Kranj, Slovenia


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest

cron