PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Aufsetzen von Nextcloud - Umleitungsfehler



NSK
16.05.2017, 19:11
Hallo liebe Gemeinde.

Ich habe mich vorhin an die Installation von Nextcloud gemacht.
Habe dabei dieses Tutorial gefunden:
https://eigene-cloud-einrichten.de/nextcloud-installieren-und-einrichten-so-gehts

(https://eigene-cloud-einrichten.de/nextcloud-installieren-und-einrichten-so-gehts)Habe dann meine nginx config damit bearbeitet und eben IHRHOST.DYNDNS.de durch cloud.meinedomain.xyz ersetzt
https://eigene-cloud-einrichten.de/getNginxConfig?software=nextcloud&host=IHRHOST.DYNDNS.DE%22
(https://eigene-cloud-einrichten.de/getNginxConfig?software=nextcloud&host=IHRHOST.DYNDNS.DE%22)
Naja, nun kann ich leider nicht darauf zugreifen, da ich einen Umleitungsfehler bekomme.
Habe mir die Config bereits angeschaut, werde aber daraus nicht schlau.

MfG,
NSK

J0hn.X3r
17.05.2017, 13:14
Ahoi,

was steht im error_log von nginx? Kannst du uns den zeigen?

Ansonsten teste mal die offizielle nginx config von Nextcloud:

https://docs.nextcloud.com/server/11/admin_manual/installation/nginx_nextcloud_9x.html#nextcloud-in-the-webroot-of-nginx
server_name und eventuell php-handler anpassen.. ggf. noch das Verzeichnis, wo du nextcloud installierst bzw installieren moechtest

NSK
17.05.2017, 14:12
Wenn ich über systemctl abfrage, gibt er mir keinen error aus. Schaue, wenn ich zuhause bin, mal im log.
danke, werd es testen :)

NSK
18.05.2017, 18:33
Okay, habe nun in den Errorlog geschaut und nichts gefunden, was sich auf das Problem beziehen könnte.

E: Ich versuche jetzt mal die Standardconfiguration zu implementieren.
Was müsste ich denn bei dem PHP-Header bearbeiten?
E: Habe die empfohlene Config genommen. Problem besteht weiterhin
Ports 9000 für fastcgi und https sind offen

J0hn.X3r
19.05.2017, 08:51
Ahoi,

beim PHP Header brauchst du nichts anpassen, sondern beim Handler :P Welche Linux Distri nutzt du?

An sich ist die Installation eigentlich recht einfach.

Du laedst die aktuelle Version runter, ueberpruefst wenn du Lust und Zeit hast, ob die Checksummen uebereinstimmen.

Entpackst das ganze und machst am besten ein:


cp -r nextcloud /var/www

Damit wird der entpackte Ordner ins webverzeichnis /var/www kopiert. Nutzt dann am besten folgendes Permissionsscript:



#!/bin/bash
ncpath='/var/www/nextcloud'
htuser='www-data'
htgroup='www-data'
rootuser='root'

printf "Creating possible missing Directories\n"
mkdir -p $ncpath/data
mkdir -p $ncpath/assets
mkdir -p $ncpath/updater

printf "chmod Files and Directories\n"
find ${ncpath}/ -type f -print0 | xargs -0 chmod 0640
find ${ncpath}/ -type d -print0 | xargs -0 chmod 0750

printf "chown Directories\n"
chown -R ${rootuser}:${htgroup} ${ncpath}
chown -R ${htuser}:${htgroup} ${ncpath}/apps/
chown -R ${htuser}:${htgroup} ${ncpath}/assets/
chown -R ${htuser}:${htgroup} ${ncpath}/config/
chown -R ${htuser}:${htgroup} ${ncpath}/data/
chown -R ${htuser}:${htgroup} ${ncpath}/themes/
chown -R ${htuser}:${htgroup} ${ncpath}/updater/

chmod +x ${ncpath}/occ

printf "chmod/chown .htaccess\n"
if [ -f ${ncpath}/.htaccess ]
then
chmod 0644 ${ncpath}/.htaccess
chown ${rootuser}:${htgroup} ${ncpath}/.htaccess
fi
if [ -f ${ncpath}/data/.htaccess ]
then
chmod 0644 ${ncpath}/data/.htaccess
chown ${rootuser}:${htgroup} ${ncpath}/data/.htaccess
fi


Passt ggf. Verzeichnis oder Webserver user und gruppe an, sollte bei Debian zum Beispiel aber so passen.

Dann schaust du dir die beispiel nginx config an:



upstream php-handler {
server 127.0.0.1:9000;
#server unix:/var/run/php5-fpm.sock;
}

server {
listen 80;
server_name cloud.example.com;
# enforce https
return 301 https://$server_name$request_uri;
}

server {
listen 443 ssl;
server_name cloud.example.com;

ssl_certificate /etc/ssl/nginx/cloud.example.com.crt;
ssl_certificate_key /etc/ssl/nginx/cloud.example.com.key;

# Add headers to serve security related headers
# Before enabling Strict-Transport-Security headers please read into this
# topic first.
# add_header Strict-Transport-Security "max-age=15768000;
# includeSubDomains; preload;";
#
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;

# Path to the root of your installation
root /var/www/nextcloud/;

location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}

# The following 2 rules are only needed for the user_webfinger app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
#rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json
# last;

location = /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}

# set max upload size
client_max_body_size 512M;
fastcgi_buffers 64 4K;

# Disable gzip to avoid the removal of the ETag header
gzip off;

# Uncomment if your server is build with the ngx_pagespeed module
# This module is currently not supported.
#pagespeed off;

location / {
rewrite ^ /index.php$uri;
}

location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
deny all;
}
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
}

location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
#Avoid sending the security headers twice
fastcgi_param modHeadersAvailable true;
fastcgi_param front_controller_active true;
fastcgi_pass php-handler;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
}

location ~ ^/(?:updater|ocs-provider)(?:$|/) {
try_files $uri/ =404;
index index.php;
}

# Adding the cache control header for js and css files
# Make sure it is BELOW the PHP block
location ~* \.(?:css|js|woff|svg|gif)$ {
try_files $uri /index.php$uri$is_args$args;
add_header Cache-Control "public, max-age=7200";
# Add headers to serve security related headers (It is intended to
# have those duplicated to the ones above)
# Before enabling Strict-Transport-Security headers please read into
# this topic first.
# add_header Strict-Transport-Security "max-age=15768000;
# includeSubDomains; preload;";
#
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
# Optional: Don't log access to assets
access_log off;
}

location ~* \.(?:png|html|ttf|ico|jpg|jpeg)$ {
try_files $uri /index.php$uri$is_args$args;
# Optional: Don't log access to other assets
access_log off;
}
}


Ich empfehle die Nutzung von php-fpm, der obere Bereich aendert sich also zu:



upstream php-handler {
#server 127.0.0.1:9000;
server unix:/var/run/php5-fpm.sock;
}


Wenn du PHP 7 oder 7.1 nutzt (das empfehle ich), dann muesste das entsprechend auf "unix:/var/run/php/php7.1-fpm.sock;" abgeaendert werden.

Wenn du ein SSL Zertifikat hast (zum Beispiel von lets encrypt) dann ist das gut, dann koennteste direkt die Keys in der Config anpassen bzw. reinsetzen - wenn (noch) nicht, muesstest du die Weiterleitung (also den ersten server-Block) auskommentieren und "listen 80;" ueber dem "listen 443;" im zweiten Server-Block hinzufuegen (oder gleich 80 statt 443 reinschreiben) und zusaetzlich das "listen 443" und die "ssl_cert" zeilen auskommentieren. server_name anpassen nicht vergessen.

Eigentlich sollte dann alles soweit klappen - wenn nicht, werden dir fehlende php-module aufgelistet die du eben noch nachinstallieren muesstest.

Wenn noch Fragen offen sind.. gerne :)

NSK
20.05.2017, 16:04
Sooooooo, habe nun alles gemacht.

Benutze Ubuntu 16.04 LTS

Habe immer noch das gleiche Problem wie vorher.

Mein Verzeichnis ist /var/www/cloud ( anstatt nextcloud - habe ich aber dementsprechend in die config geschrieben)
Habe die .sh durchlaufen lassen. Anschließend meine Config überprüft und mit deiner verglichen.
Ware nahezu identisch und hab dann deine kopiert und abgeändert.
Immer noch das gleiche Problem, aber danke für deine Hilfe :)

J0hn.X3r
21.05.2017, 03:06
Merkwuerdig.. Aber im Errorlog _muesste_ irgendwas stehen. Zeig uns doch die Ausgabe von "cat /var/log/nginx/error.log" - pfade oder sowas kannst du ja zensieren

NSK
21.05.2017, 16:26
Hab wohl dummerweise immer die Falsche error.log ausgelesen und nunja, dass ist das Ergebnis:



2017/05/21 07:38:17 [error] 28454#28454: *49 open() "/var/www/html/robots.txt" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /robots.txt HTTP/1.1", host: "XXXXXX"
2017/05/21 07:38:17 [error] 28454#28454: *50 open() "/var/www/html/sitemap.xml" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /sitemap.xml HTTP/1.1", host: "XXXXXX"
2017/05/21 10:22:00 [error] 28454#28454: *54 open() "/var/www/html/cgi/common.cgi" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /cgi/common.cgi HTTP/1.0", host: "XXXXXX"
2017/05/21 10:22:01 [error] 28454#28454: *55 open() "/var/www/html/stssys.htm" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /stssys.htm HTTP/1.0", host: "XXXXXX"
2017/05/21 10:22:02 [error] 28457#28457: *57 open() "/var/www/html/command.php" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "POST /command.php HTTP/1.0", host: "XXXXXX"
2017/05/21 10:35:10 [error] 28457#28457: *58 connect() failed (111: Connection refused) while connecting to upstream, client: XXXXXX, server: cloud.XXXXXX, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host$
2017/05/21 12:14:35 [error] 28457#28457: *66 open() "/var/www/html/apple-touch-icon-120x120-precomposed.png" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /apple-touch-icon-120x120-precom$
2017/05/21 12:14:35 [error] 28457#28457: *67 open() "/var/www/html/apple-touch-icon-120x120.png" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /apple-touch-icon-120x120.png HTTP/1.1", ho$
2017/05/21 12:14:36 [error] 28457#28457: *68 open() "/var/www/html/apple-touch-icon-precomposed.png" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /apple-touch-icon-precomposed.png HTTP/$
2017/05/21 12:14:36 [error] 28457#28457: *69 open() "/var/www/html/apple-touch-icon.png" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /apple-touch-icon.png HTTP/1.1", host: "XXXXXX"
2017/05/21 12:14:36 [error] 28457#28457: *70 open() "/var/www/html/favicon.ico" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /favicon.ico HTTP/1.1", host: "XXXXXX"
2017/05/21 12:42:09 [error] 28457#28457: *72 open() "/var/www/html/script" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /script HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:10 [error] 28457#28457: *73 open() "/var/www/html/jenkins/script" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /jenkins/script HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:12 [error] 28457#28457: *74 open() "/var/www/html/hudson/script" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /hudson/script HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:13 [error] 28457#28457: *75 open() "/var/www/html/login" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /login HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:14 [error] 28457#28457: *76 open() "/var/www/html/jenkins/login" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /jenkins/login HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:16 [error] 28457#28457: *77 open() "/var/www/html/hudson/login" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /hudson/login HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:17 [error] 28457#28457: *78 open() "/var/www/html/jmx-console" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /jmx-console HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:19 [error] 28457#28457: *79 open() "/var/www/html/manager/html" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /manager/html HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:20 [error] 28457#28457: *80 open() "/var/www/html/msd" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /msd HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:22 [error] 28457#28457: *81 open() "/var/www/html/mySqlDumper" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /mySqlDumper HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:23 [error] 28457#28457: *82 open() "/var/www/html/msd1.24stable" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /msd1.24stable HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:24 [error] 28457#28457: *83 open() "/var/www/html/msd1.24.4" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /msd1.24.4 HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:25 [error] 28457#28457: *84 open() "/var/www/html/mysqldumper" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /mysqldumper HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:27 [error] 28457#28457: *85 open() "/var/www/html/MySQLDumper" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /MySQLDumper HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:28 [error] 28457#28457: *86 open() "/var/www/html/mysql" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /mysql HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:29 [error] 28457#28457: *87 open() "/var/www/html/sql" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /sql HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:30 [error] 28457#28457: *88 open() "/var/www/html/phpmyadmin" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /phpmyadmin HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:31 [error] 28457#28457: *89 open() "/var/www/html/phpMyAdmin" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /phpMyAdmin HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:33 [error] 28457#28457: *90 open() "/var/www/html/mysql" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /mysql HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:34 [error] 28457#28457: *91 open() "/var/www/html/sql" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /sql HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:38 [error] 28457#28457: *92 open() "/var/www/html/myadmin" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /myadmin HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:41 [error] 28457#28457: *93 open() "/var/www/html/phpMyAdmin-4.2.1-all-languages" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /phpMyAdmin-4.2.1-all-languages HTTP/1.1", h$
2017/05/21 12:42:43 [error] 28457#28457: *94 open() "/var/www/html/phpMyAdmin-4.2.1-english" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /phpMyAdmin-4.2.1-english HTTP/1.1", host: "5.230.$
2017/05/21 12:42:45 [error] 28457#28457: *96 open() "/var/www/html/sqlite/main.php" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /sqlite/main.php HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:46 [error] 28457#28457: *97 open() "/var/www/html/SQLite/SQLiteManager-1.2.4/main.php" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /SQLite/SQLiteManager-1.2.4/main.php HT$
2017/05/21 12:42:49 [error] 28457#28457: *98 open() "/var/www/html/SQLiteManager-1.2.4/main.php" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /SQLiteManager-1.2.4/main.php HTTP/1.1", host:$
2017/05/21 12:42:51 [error] 28457#28457: *99 open() "/var/www/html/sqlitemanager/main.php" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /sqlitemanager/main.php HTTP/1.1", host: "5.230.134.$
2017/05/21 12:42:53 [error] 28457#28457: *100 open() "/var/www/html/SQlite/main.php" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /SQlite/main.php HTTP/1.1", host: "XXXXXX:80"
2017/05/21 12:42:54 [error] 28457#28457: *101 open() "/var/www/html/SQLiteManager/main.php" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /SQLiteManager/main.php HTTP/1.1", host: "5.230.134$
2017/05/21 12:48:24 [error] 28457#28457: *103 open() "/var/www/html/apple-touch-icon-120x120-precomposed.png" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /apple-touch-icon-120x120-preco$
2017/05/21 12:48:24 [error] 28457#28457: *104 open() "/var/www/html/apple-touch-icon-120x120.png" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /apple-touch-icon-120x120.png HTTP/1.1", h$
2017/05/21 12:48:24 [error] 28457#28457: *105 open() "/var/www/html/apple-touch-icon-precomposed.png" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /apple-touch-icon-precomposed.png HTTP$
2017/05/21 12:48:24 [error] 28457#28457: *106 open() "/var/www/html/apple-touch-icon.png" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /apple-touch-icon.png HTTP/1.1", host: "XXXXXX"
2017/05/21 12:48:24 [error] 28457#28457: *107 open() "/var/www/html/favicon.ico" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /favicon.ico HTTP/1.1", host: "XXXXXX"
2017/05/21 13:50:15 [error] 28457#28457: *115 open() "/var/www/html/apple-touch-icon-120x120-precomposed.png" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /apple-touch-icon-120x120-preco$
2017/05/21 13:50:16 [error] 28457#28457: *116 open() "/var/www/html/apple-touch-icon-120x120.png" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /apple-touch-icon-120x120.png HTTP/1.1", h$
2017/05/21 13:50:16 [error] 28457#28457: *117 open() "/var/www/html/apple-touch-icon-precomposed.png" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /apple-touch-icon-precomposed.png HTTP$
2017/05/21 13:50:16 [error] 28457#28457: *118 open() "/var/www/html/apple-touch-icon.png" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /apple-touch-icon.png HTTP/1.1", host: "XXXXXX"
2017/05/21 13:50:16 [error] 28457#28457: *119 open() "/var/www/html/favicon.ico" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /favicon.ico HTTP/1.1", host: "XXXXXX"
2017/05/21 13:56:03 [error] 28457#28457: *120 connect() failed (111: Connection refused) while connecting to upstream, client: XXXXXX, server: cloud.XXXXXX, request: "GET /admin/config.php HTTP/1.1", upstream: "fastcgi://127$
2017/05/21 14:18:23 [error] 28453#28453: *123 open() "/var/www/html/apple-touch-icon-120x120-precomposed.png" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /apple-touch-icon-120x120-preco$
2017/05/21 14:18:23 [error] 28453#28453: *124 open() "/var/www/html/apple-touch-icon-120x120.png" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /apple-touch-icon-120x120.png HTTP/1.1", h$
2017/05/21 14:18:23 [error] 28453#28453: *125 open() "/var/www/html/apple-touch-icon-precomposed.png" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /apple-touch-icon-precomposed.png HTTP$
2017/05/21 14:18:23 [error] 28453#28453: *126 open() "/var/www/html/apple-touch-icon.png" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /apple-touch-icon.png HTTP/1.1", host: "XXXXXX"
2017/05/21 14:18:23 [error] 28453#28453: *127 open() "/var/www/html/favicon.ico" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /favicon.ico HTTP/1.1", host: "XXXXXX"
2017/05/21 15:52:13 [error] 28453#28453: *128 "/var/www/html/webadmin/index.html" is not found (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /webadmin/ HTTP/1.1", host: "XXXXXX"
2017/05/21 16:26:28 [error] 28453#28453: *130 open() "/var/www/html/apple-touch-icon-120x120-precomposed.png" failed (2: No such file or directory), client: XXXXXX, server: XXXXXX, request: "GET /apple-touch-icon-120x120-preco$


Danke nochmal für die Hilfe und sorry für die "Schwärzungen".


E1:
Es sind viele Fehlermeldungen dabei, die für mich gar kein Sinn ergeben.
Die Datein und / oder zugehörige Datein sind gar nicht vorhanden und von denen habe ich auch noch nie etwas gehört.
Könnte aber an Wordpress liegen.

Installiert auf dem Server ist z.Z:
Wordpress, TS3 Server, Sinusbot, CSGo Server, Imageupload Script, Nginx(Hauptverzeichnis, Imageupload, Wordpress), MySQL

E2:
Die Fehler beziehen sich so gut wie alle auf /var/www/html. Das Cloudverzeichnis liegt allerdings in /var/www/cloud

E3:
Die einzige Fehlermeldung, welche sich auf Cloud bezieht, ist die folgende:

2017/05/21 10:35:10 [error] 28457#28457: *58 connect() failed (111: Connection refused) while connecting to upstream, client: XXXXXX, server: cloud.XXXXXX, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host$
Also erwidert er die Connection nicht, da PHP nicht richtig funktioniert?
Erklärt dass das Weiterleitungsproblem?

J0hn.X3r
21.05.2017, 19:58
Die schwaerzung passen, aber wie du erkannt hast, hat fast keiner etwas mit nextcloud zu tun - hast du die url auch ein paar mal aufgerufen und _dann_ in den errorlog geschaut?

Zeigst du uns nen Teil aus der Wordpress nginx config? Ich vermute das es ein Problem mit php gibt, so wie du es richtig erkannt hast:


Also erwidert er die Connection nicht, da PHP nicht richtig funktioniert?

Davon gehe ich aus..

Daher schau mal in deiner "normalen" nginx config (fuer die anderen Seiten) wie du PHP dort verwaltet hast.. :)

NSK
22.05.2017, 16:50
Hey,

ja hab die URL ein paar Mal davor aufgerufen und in den Log geschaut. Als da nichts war, hab ich den Vorgang wiederholt.
Das scheint wohl der einzige Fehler zu sein.

Auf dem normalen Webserver ist PHP nicht aktiviert, da ich es dort nicht brauche.
Dort,l wo die Images upgeloadet werden, ist es wie folgt:



location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php7.0-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php7.0-fpm:
fastcgi_pass unix:/run/php/php7.0-fpm.sock;


Scheint für mich gleich zu sein, wie bei dem Cloudserver.

Nun kommen wir zu Wordrpress:



server {
listen 80 ;
#listen [::]:80 ;
# SSL configuration
#
# listen 443 ssl default_server; listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic. See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration. See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package Don't use them in a production server!
#
# include snippets/snakeoil.conf;
root /var/www/blog/wordpress;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html index.php;
server_name blog.XXXXX;
location / {
# First attempt to serve request as file, then as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php7.0-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php7.0-fpm:
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}




Danke mal wieder im Vorraus

J0hn.X3r
22.05.2017, 20:29
Hello,

nun bin ich verwirrt.

Oben schreibst du:



E: Habe die empfohlene Config genommen. Problem besteht weiterhin
Ports 9000 für fastcgi und https sind offen

und bei den zwei geposteten nginx configs nutzt du php-fpm?

Nutze mal dieser Config und passe nur den server_namen also deine Domain an:



server {
listen 80;
#listen 443 ssl;
server_name cloud.xxxx;

#ssl_certificate /etc/ssl/nginx/cloud.example.com.crt;
#ssl_certificate_key /etc/ssl/nginx/cloud.example.com.key;

# Add headers to serve security related headers
# Before enabling Strict-Transport-Security headers please read into this
# topic first.
# add_header Strict-Transport-Security "max-age=15768000;
# includeSubDomains; preload;";
#
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;

# Path to the root of your installation
root /var/www/cloud;

location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}

# The following 2 rules are only needed for the user_webfinger app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
#rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json
# last;

location = /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}

# set max upload size
client_max_body_size 512M;
fastcgi_buffers 64 4K;

# Disable gzip to avoid the removal of the ETag header
gzip off;

# Uncomment if your server is build with the ngx_pagespeed module
# This module is currently not supported.
#pagespeed off;

location / {
rewrite ^ /index.php$uri;
}

location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
deny all;
}
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
}

location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
#Avoid sending the security headers twice
fastcgi_param modHeadersAvailable true;
fastcgi_param front_controller_active true;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
}

location ~ ^/(?:updater|ocs-provider)(?:$|/) {
try_files $uri/ =404;
index index.php;
}

# Adding the cache control header for js and css files
# Make sure it is BELOW the PHP block
location ~* \.(?:css|js|woff|svg|gif)$ {
try_files $uri /index.php$uri$is_args$args;
add_header Cache-Control "public, max-age=7200";
# Add headers to serve security related headers (It is intended to
# have those duplicated to the ones above)
# Before enabling Strict-Transport-Security headers please read into
# this topic first.
# add_header Strict-Transport-Security "max-age=15768000;
# includeSubDomains; preload;";
#
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
# Optional: Don't log access to assets
access_log off;
}

location ~* \.(?:png|html|ttf|ico|jpg|jpeg)$ {
try_files $uri /index.php$uri$is_args$args;
# Optional: Don't log access to other assets
access_log off;
}
}

Den Weiterleitungsblock von port 80 auf https kannst du erstmal weg lassen und spaeter aktivieren, solange das so noch nicht funktioniert.

Ansonsten noch zusaetzlich die Frage, ob die Config im nginx auch richtig aktiviert wurde? Aber da es mit wordpress und den imageupload funktioniert, gehe ich davon aus..

Ansonsten waere es eventuell einfacher wenn wir uns im Jabber oder so mal austauschen :D

NSK
27.05.2017, 00:21
Okay,

mit deiner Config hat es funktioniert. Danke :)

Hab erst den Test mit HTTPS und dann mit gemacht, geht beides.
Muss nun nur noch fehlende PHP-Module installieren.

VIelen Dank :)

---------- Post added at 23:21 ---------- Previous post was at 21:40 ----------

Hatte das zwar bei vorherigen Versuchen bereits auskommentiert und dat es nichts gebracht, aber dieses Mal ist folgendes für den Weiterleitungsfehler verantwortlich:
return 301 https://$server_name$request_uri;

Stellt sich mir nur die Frage, wieso?

E:

Habe auch folgendes versucht:

if ($ssl_protocol = "") {
rewrite ^ https://$server_name$request_uri? permanent;
}

und ganz schlicht nur:

rewrite ^ https://$server_name$request_uri? permanent;

Kein Erfolg

E:

Ohne etwas zu verändern funktioniert es nun.
Naja, so ist das eben.
Habe nun über Cloudflare HTTPS aktiviert, aber tut ja nichts zur Sache.

Habe die PHP Datei richtig konfiguriert, etc.
Nur eine Fehlermeldung bleibt(eig 2, eine davon ist die Memory Cache Meldung und dazu bin ich zu dumm):
Einige Dateien haben die Integritätsprüfung nicht bestanden. Weiterführende Information findest du in unserer Dokumentation.


Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- core
- EXTRA_FILE
- permissions.sh

Raw output
==========
Array
(
[core] => Array
(
[EXTRA_FILE] => Array
(
[permissions.sh] => Array
(
[expected] =>
[current] => xxxxxxxx
)

)

)

)

Habe nun ein bisschen gegoogelt und kam meist zu der Lösung, dass die Datein schlichtweg falsch oder nicht kopiert wurden.
Würde aber ungern etwas verändern, da die Installation einige Nerven gekostet hat.

Okay, nvm.

Es ist spät und ich bin müde.. ach, was sollen die Ausreden? Manchmal bin ich einfach nicht die hellste Kerze auf der Torte.
Du hast mir am Anfang ein Permissionsscript gegeben und dieses hab ich als permissions.sh gespeichert.
War mit im Verzeichnis und hat den Fehler verursacht xD

NSK
27.05.2017, 12:48
Ich gebe es echt langsam auch.
Es funktionierte eine Stunde, ich habe nichts verändert und nun das:




Dieser Server hat keine funktionierende Internetverbindung: Mehrere Ziele konnten nicht erreicht werden. Dies bedeutet, dass einige Funktionen, wie das Einhängen exernen Speichers, Benachrichtigungen über Updates oder die Installation von Drittanbieter-Apps nicht funktionieren. Der Zugriff auf entfernte Dateien und das Senden von E-Mail-Benachrichtigungen wird wahrscheinlich ebenfalls nicht funktionieren. Es wird empfohlen, die Internet-Verbindung für diesen Server zu aktivieren, wenn Du alle Funktionen nutzen möchtest.



Das einzige, was ich gemacht habe, war die serverseitige Verschlüsselung zu aktivieren, die aber nicht funktioniert, da kein Modul geladen ist und sich nicht mehr deaktivieren lässt.

E: Okay, nachdem ich ausgeschlafen habe, habe ich mich mal an das Problem gesetzt und den Log durchgeschaut.
Es lag an dem fehlenden Verschlüsselungsmodul, dass ich nun aktiviert habe.
Funktioniert nun alles :)

J0hn.X3r
27.05.2017, 16:42
Ok das ist krass :D Das ist eigentlich alles mega simple und das Verschluesselungsmodul aktivieren ist ein klick in den Apps...

Aber freut mich, dass nun alles klappt :) Gibts noch irgendwelche Probleme?