I don't really know what to send you here so please ask. The problem is I cannot access my local apache2 webserver neither via localhost or my machine's hostname nor via 127.0.0.1. At first I could actually access it through my hostname (andrey-desktop) but the problem was that it leads to a different IP-address (127.0.0.53) and other hostnames lead to the default one (127.0.0.1). I couldn't set up my .htaccess to work so I changed stuff in apache2.conf from AllowOverride None to All and now it doesn't open at all. The error is ERR_CONNECTION_REFUSED. Also while I was trying to fix this myself there was a PHPMyAdmin tab opened in my browser and all the time it successfully loaded, even now I can access it while I can't open the site itself.
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.53
options edns0 trust-ad
AllowOverride All
, you might need to runsudo a2enmod rewrite
to enable module rewrite. – Raffa Dec 13 '20 at 10:44.htaccess
files and it should work for this purpose. But after reading your post again, your issue is different. You do not need to changeAllowOverride
to resolve it. Please add the output ofcat /etc/resolv.conf
to your question. – Raffa Dec 13 '20 at 11:04apache2.conf
first then restart apache and apply the solution in the link as this appears to be DNS issue and apache. – Raffa Dec 13 '20 at 11:25