I know this question has already been answered mutiple times, but the answers are almost all diffrent and are sorta confusing. I have tried alot of answers but none of them work. I follow the answer of this question (switch apache from prefork to event in Ubuntu 16, get php 7 working) and that worked correctly. But then I did something (cant remember what.. oops) and it broke giving me the following error:
File not found. Virtual host file:
#ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/run/php/php7.2-fpm.sock|fcgi://localhost/var/www/nextcloud/ #ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/run/php/php7.2-fpm.sock|fcgi://127.0.0.1:9000 LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so <IfModule mod_headers.c> Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains" </IfModule> <IfModule mod_ssl.c> <VirtualHost *:443> ServerAdmin [[..]]@icloud.com ServerName [[..]].me ServerAlias www.[[..]].me DocumentRoot /var/www/nextcloud ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined Include /etc/letsencrypt/options-ssl-apache.conf SSLCertificateFile /etc/letsencrypt/live/www.[[..]].me/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/www.[[..]].me/privkey.pem ProxyPassMatch ^/(.*\.php(/.*)?)$ unix:/run/php/php7.2-fpm.sock|fcgi://localhost/var/www/nextcloud/ # <FilesMatch \.php> # SetHandler "proxy:unix:/run/php/php7.2-fpm.sock|fcgi://localhost/var/www/nextcloud/" # <FilesMatch> </VirtualHost> </IfModule> <IfModule mod_ssl.c> <VirtualHost *:80> ServerAdmin [[..]]@icloud.com ServerName [[..]].me ServerAlias www.[[..]].me DocumentRoot /var/www/nextcloud ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined RewriteEngine on Redirect permanent / https://[[..]].me/ # Some rewrite rules in this file were disabled on your HTTPS site, # because they have the potential to create redirection loops. # RewriteCond %{SERVER_NAME} =www.[[..]].me [OR] # RewriteCond %{SERVER_NAME} =[[..]].me # RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] # <FilesMatch \.php> # SetHandler "proxy:unix:/run/php/php7.2-fpm.sock|fcgi://localhost/" # <FilesMatch> </VirtualHost> </IfModule> <Directory /var/www/nextcloud> AllowOverride All </Directory> Also, I'm a total beginner to PHP. I'm so sorry for asking this question again. I know its a duplicate but I just can't get my hands around it.
Thank you so much!