Hallo zusammen, ich habe mir eine Ubuntu 16.04 VM Kopie erzeugt. Auf dieser lief bereits Apache2 mit php7.0 über fpm.
Aus neu gierende möchte ich nginx ausprobieren mit php7.0 über fpm. Dazu habe ich in der Kopie Apache2 deinstalliert und nginx installiert. Allerdings funktioniert unter nginx das Zusammenspiel mit fpm nicht richtig. Ich sehe nur eine weiße Seite. Ich habe mich mal nach ein paar Artikel entlang gehangelt und das sieht recht einfach aus doch irgendwie hängt es bei mir. Wahrscheinlich stehe ich nur den Fehler nicht und hoffe ihr könnt mir mal weiter helfen. Hier meine Konfigurationen.
nginx.conf
user www-data; worker_processes auto; pid /run/nginx.pid; events { worker_connections 768; # multi_accept on; } http { ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; # server_tokens off; # server_names_hash_bucket_size 64; # server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; ## # SSL Settings ## ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE ssl_prefer_server_ciphers on; ## # Logging Settings ## access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; ## # Gzip Settings ## gzip on; gzip_disable "msie6"; # gzip_vary on; # gzip_proxied any; # gzip_comp_level 6; # gzip_buffers 16 8k; # gzip_http_version 1.1; # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; ## # Virtual Host Configs ## include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*.conf; } #mail { # # See sample authentication script at: # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript # # # auth_http localhost/auth.php; # # pop3_capabilities "TOP" "USER"; # # imap_capabilities "IMAP4rev1" "UIDPLUS"; # # server { # listen localhost:110; # protocol pop3; # proxy on; # } # # server { # listen localhost:143; # protocol imap; # proxy on; # } #}
default.conf (ist verlinkt in /etc/nginx/sites_enabled)
upstream php-handler { server 127.0.0.1:9000; } server { listen 80; listen [::]:80 ipv6only=on; server_name localhost; root /var/www/html; index index.php index.html; location / { rewrite ^ /index.php; } location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass php-handler; fastcgi_index index.php; } }
php7.0-fpm nextcloud.conf
[nextcloud] user = www-data group = www-data listen = 127.0.0.1:9000 listen.allowed_clients = 127.0.0.1 listen.owner = www-data listen.group = www-data listen.mode = 0666 pm = dynamic pm.max_children = 256 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 3 access.log = "/var/log/php-fpm/$pool/access.log" access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" slowlog = "/var/log/php-fpm/$pool/slow.log" security.limit_extensions = .php .php3 .php4 .php5 php_flag[display_errors] = on php_admin_flag[log_errors] = on php_admin_value[max_execution_time] = 600 php_admin_value[error_reporting] = E_ALL
tailf /var/log/php-fpm/nextcloud/access.log
127.0.0.1 - 26/Apr/2017:14:13:54 +0200 "- " 200 - 0.044 2048 0.00% 127.0.0.1 - 26/Apr/2017:14:14:14 +0200 "- " 200 - 0.746 2048 0.00% 127.0.0.1 - 26/Apr/2017:14:14:15 +0200 "- " 200 - 0.576 2048 0.00% 127.0.0.1 - 26/Apr/2017:14:14:15 +0200 "- " 200 - 0.057 2048 0.00% 127.0.0.1 - 26/Apr/2017:14:17:09 +0200 "- " 200 - 0.401 2048 0.00% 127.0.0.1 - 26/Apr/2017:14:17:10 +0200 "- " 200 - 0.623 2048 0.00% 127.0.0.1 - 26/Apr/2017:14:17:10 +0200 "- " 200 - 0.067 2048 0.00% 127.0.0.1 - 26/Apr/2017:14:17:11 +0200 "- " 200 - 0.051 2048 0.00% 127.0.0.1 - 26/Apr/2017:14:17:11 +0200 "- " 200 - 0.121 2048 0.00% 127.0.0.1 - 26/Apr/2017:14:17:11 +0200 "- " 200 - 0.083 2048 0.00%
Obwohl php7.0-fpm in seiner access.log des pools nextcloud zugriffe verzeichnet bekomme ich meine index.php nicht ausgegeben.
Hier meine index.php unter /var/www/html
1 2 3 4 | <?php echo "Hallo Welt"; ?> |
Hat jemand eine Idee warum die Seite leer ist?
Gruß Volker