Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

176
Views
Apache2 Virtual Host is ignored except for ServerAlias

I'm attempting to have domainname.com and www.domainname.com go to my virtual host instead of the 000-default host. While going to www.domainname.com works as intended and returns the virtual host site, domainname.com still returns the apache2 "It works!" page.

(Actual domain name was replaced with domainname.com)

Contents of /etc/apache2/sites-available/domainname.com.conf:

<VirtualHost *:80>
    ServerName domainname.com
    ServerAlias www.domainname.com
    DocumentRoot /var/www/domainname.com
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    DirectoryIndex index.html
<Directory /var/www/domainname.com>
    Options -Indexes +IncludesNOEXEC +FollowSymLinks +ExecCGI
    Allow from all
    AllowOverride All
</Directory>
    RewriteEngine on
</VirtualHost>

Any ideas as to what may be causing this?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

It appears my browser had cached the result of domainname.com and continued to serve the cached copy. Other browsers display the correct result.

This seriously had me stumped for over an hour and clearing my cache was the fix.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!