Heyho folks,
I am need for a little help regarding Apache. I had an successful running nextcloud instance for a while. Few days ago stupid me decided to install pihole on the same server where nextcloud is running. That was a stupid mistake. After getting rid of pihole my nextcloud wasn’t available anymore. After some time I figured out Apache wasn’t configured correctly anymore. After messing around with active sites and active configs I got it to the point that a .php was displayed in plain text.
My nextcloud.conf
VirtualHost *:80>
ServerAdmin master@localhost.com
DocumentRoot /var/www/nextcloud/
ServerName mydomain
ServerAlias www.mydomain
Alias /nextcloud "/var/www/nextcloud/"
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
Require all granted
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.mydomain [OR]
RewriteCond %{SERVER_NAME} =mydomain
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
My nextcloud-ssl.conf
VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/nextcloud
SSLEngine on
SSLCertificateFile /etc/apache2/myssl/server.cert.crt
SSLCertificateKeyFile /etc/apache2/myssl/server.cert.key
</VirtualHost>
The .php that is being displayed
I am a bit on a dry path here where I dont know what to do expect wiping the machine and starting from scratch. Any help appreciated. If further information is needed let me know.
Big thanks in advance!