How to load a configuration file only when it exists in Apache httpd?

Solution Verified - Updated -

Issue

  • How to load a configuration file only when the it exists in Apache httpd?
  • If I specified the following Include directive in my httpd.conf, Apache httpd fails to start when the specified file does not exist. How do I load the specified configuration file only when it exists?

    Include conf.d/example_optional.conf
    

Environment

  • Red Hat Enterprise Linux (RHEL)
  • Red Hat Software Collections (RHSCL)
  • Red Hat JBoss Core Services (JBCS)
  • Apache Web Server (HTTPD)

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