Which VirtualHost is used as the default one in Apache httpd?

Solution Verified - Updated -

Issue

  • When a request does not match any specified ServerName directive in the defined name-based <VirtualHost>, which <VirtualHost> is used as the default in Apache httpd
  • I defined multiple name-based <VirtualHost> in multiple conf files conf.d/*.conf. Which <VirtualHost> is used as a default one?

Environment

  • Red Hat Enterprise Linux (RHEL) 6.x, 7.x
  • Red Hat JBoss Web Server (JWS) 1.x, 2.x, 3.x
  • Apache httpd 2.2, 2.4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content