Any help would be greatly appreciated. I am stuck with this issue for a long time now.
Now here is the thing. I have on my ubuntu 16.04 server two vhosts, one for Nextcloud (https://mydomain.com/owncloud/) that works perfectly and one for my wordpress (https://mydomain.com/) that does not work. Each time I enter https://mydomain.com it returns https://mydomain.com:16501 and my web browser safari says it cannot connect to the server mydomain.com.
My wordpress used to work and I have no idea where this 16501 comes from.
I have basicaly three vhosts in sites-enabled...
000.default.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =mydomain.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
nextcloud.conf
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin mail@mymail.com
ServerName mydomain.com
DocumentRoot /var/www/html
Alias /nextcloud "/var/www/owncloud/"
<Directory /var/www/owncloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/owncloud
SetEnv HTTP_HOME /var/www/owncloud
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15768000; preload"
</IfModule>
SSLCertificateFile /etc/letsencrypt/live/mydomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
wordpress.conf
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin mail@mymail.com
ServerName mydomain.com
ServerAlias www.mydomain.com
DocumentRoot /var/www/html
<Directory /var/www/html/>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLCertificateFile /etc/letsencrypt/live/mydomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
Thanks for your help!
/var/log/apache
– Mark D Nov 15 '18 at 16:21