Pfann
March 29, 2020, 7:44am
1
Hello. i got a little problem. Maybe someone can gimme a hint.
if i enter my nextclud with my external ip or dyndns all works fine.
If i use 192.168.178.49/nextcloud/ or localhost/nextcloud/ it tells me error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Apache/2.4.38 (Raspbian) Server at 192.168.178.49 Port 80
Does someone know a Hint ?
tflidd
March 29, 2020, 10:47am
2
Perhaps something with the virtual hosts in your webserver. But for Internal Server Errors you must check your webserver logfiles for more details, like this it is too generic.
Pfann
March 31, 2020, 12:05pm
3
okay. i figured out that the .htaccess is the problem.
i renamed it and had access.
im a noob in this, so i will post it here, maybe someone find the problem?
htaccess
SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
SetEnvIfNoCase Authorization "(.+)" HTTP_AUTHORIZATION=$1
# Add security and privacy related headers
Header always set Referrer-Policy "no-referrer"
Header always set X-Content-Type-Options "nosniff"
Header always set X-Download-Options "noopen"
Header always set X-Frame-Options "SAMEORIGIN"
Header always set X-Permitted-Cross-Domain-Policies "none"
Header always set X-Robots-Tag "none"
Header always set X-XSS-Protection "1; mode=block"
SetEnv modHeadersAvailable true
Add cache control for static resources
<FilesMatch “.(css|js|svg|gif)$”>
Header set Cache-Control “max-age=15778463”
Let browsers cache WOFF files for a week
<FilesMatch “.woff2?$”>
Header set Cache-Control “max-age=604800”
php_value mbstring.func_overload 0
php_value default_charset ‘UTF-8’
php_value output_buffering 0
php_value upload_max_filesize 500000M
php_value post_max_size 500000M
SetEnv htaccessWorking true
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} DavClnt
RewriteRule ^$ /remote.php/webdav/ [L,R=302]
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^.well-known/host-meta /public.php?service=host-meta [QSA,L]
RewriteRule ^.well-known/host-meta.json /public.php?service=host-meta-json [QSA,L]
RewriteRule ^.well-known/webfinger /public.php?service=webfinger [QSA,L]
RewriteRule ^.well-known/nodeinfo /public.php?service=nodeinfo [QSA,L]
RewriteRule ^.well-known/carddav /remote.php/dav/ [R=301,L]
RewriteRule ^.well-known/caldav /remote.php/dav/ [R=301,L]
RewriteRule ^remote/(.) remote.php [QSA,L]
RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/. - [R=404,L]
RewriteCond %{REQUEST_URI} !^/.well-known/(acme-challenge|pki-validation)/.*
RewriteRule ^(?:.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
DirectoryIndex index.php index.html
AddDefaultCharset utf-8
Options -Indexes
ModPagespeed Off
DO NOT CHANGE ANYTHING ABOVE THIS LINE
ErrorDocument 403 /nextcloud/
ErrorDocument 404 /nextcloud/
Pfann:
192.168.178.49/nextcloud
Really
https://192.168.178.49/nextcloud
and not
https://192.168.178.49
Do you use /nextcloud also from outside?
Pfann
March 31, 2020, 12:26pm
7
well it was working, since 2 days it wont work ( only 192.168… )
via my dyndns or external ip it works
23.56…/nextcloud works
Do you use another website on the server so you must use /nextcloud?
My configuration without nextcloud-path (cloud.domain.tld)
RewriteRule ^$ /remote.php/webdav/ [L,R=302]
But i do not know the value for /nextcloud - installation. Perhaps it is correct.
Pfann
March 31, 2020, 12:30pm
9
i made this
#- RewriteRule ^$ /remote.php/webdav/ [L,R=302]
still blocks me, and i had no problem with this, since 2 days it blocks me
and no curently i dont use another website, but its my raspberry and want to hold this option open to make a website
Do you use one or two virtual hosts?
Perhaps you can post your configuration.
But if it works for you a few days ago this could not be the error.
Pfann
March 31, 2020, 12:35pm
11
<VirtualHost *:80>
ServerName 192.168.178.49/nextcloud
ServerAlias 192.168.178.49/nextcloud
ServerAdmin ####@###.de
DocumentRoot /var/www/html/nextcloud
<Directory /var/www/html/nextcloud/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
I think ServerName and ServerAlias is wrong.
ServerName 192.168.178.49
ServerAlias 192.168.178.49
If https://192.168.178.49/nextcloud shows to /var/www/html/nextcloud you also have to change:
DocumentRoot /var/www/html
Restart Apache2.
You can also test without /nextcloud. You can change it back after a test.
Test it with:
DocumentRoot /var/www/html/nextcloud
Restart Apache2
Pfann
April 3, 2020, 2:16pm
13
okay i fixed it. the 000-default.conf was activated. idk why but i deactivated it and now it works.
thank you for your time!