Troubleshooting2 / 5
An administrator configures an Apache virtual host but the site returns the default page instead of the custom site. The configuration file is in /etc/httpd/conf.d/mysite.conf. What is the most likely troubleshooting step?
CorrectIncorrect
Alex
Apache name-based virtual hosting routes requests using the HTTP Host header matched against ServerName and ServerAlias directives. When the default page appears, the virtual host is not matching. Common causes: ServerName mismatch (www.example.com vs example.com), config file not loaded, or syntax errors. Debug with 'apachectl -S' to list all parsed virtual hosts and source files. After fixes, validate with 'apachectl configtest' and reload with 'systemctl reload httpd'. On Debian, enable sites with a2ensite. Why distractors fail: Firewall blocking port 80 causes connection refused, not a default page. Reinstalling Apache is destructive and unnecessary. Incorrect DNS prevents reaching the server entirely. Ref: Apache httpd docs mod_core ServerName, httpd.apache.org/docs/2.4/vhosts/
Sourcehttpd.apache.org
Follow-up answers are available in the app. Create a free account — no credit card required.
Question 2 of 5
Create a free account