: Apache based Web sites show a dir listing instead of site content All websites points to a directory listing ("Index of") of /var/www/html and when I click on any sites of the list, I see
All websites points to a directory listing ("Index of") of /var/www/html and when I click on any sites of the list, I see a duplicated domain and tld.
A Syntax error is given, regarding:
line 219 of /etc/apache2/apache2.conf
Facts:
The sites worked fine until today noon, when I added a virtual host (which I removed since then).
All sites are Wordpress based and are minimal.
All sites include an .htaccess file.
There are no from either journalctrl -xe, apachectl -t, tail /var/log/auth.log, or tail /var/log/apache2/error.log.
In the Zone file of each site, A and Cname records are just fine.
What may cause this problem?
Update:
Associated error:
Syntax error on line 219 of /etc/apache2/apache2.conf: Could not open
configuration file /etc/apache2/sites-enabled/domain.tld
Note: I used apachectl -t to find this error.
More posts by @Deb1703797
1 Comments
Sorted by latest first Latest Oldest Best
If you did no major change in the server environment and if after a2ensite domain.tld.conf you cannot restart the apache service, this should solve it:
Check for syntax errors in one of the Vhost files (this is most probably it).
Make sure you have an extra empty row in the end of each Vhost file.
Answer regarding question update:
To solve the syntax error described in the question update above:
a2dissite domain.tld
Note that "domain.tld" deals with the old website you no longer have and to which a symlink stayed in sites-enabled.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.