Change the path to httpd.conf (apache2.conf)

Is there a way for me to change the path to my httpd.conf file besides starting the server with the -f?

Thanks,
David
LVL 1
David AldridgeAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slyongCommented:
Hi David,

Which distribution are you using?
0
Steve BinkCommented:
Per Apache docs:
The location of this file is set at compile-time, but may be overridden with the -f command line flag. In addition, other configuration files may be added using the Include directive, and wildcards can be used to include many configuration files.
1
David AldridgeAuthor Commented:
Using Solaris 11.3

/usr/apache2/2.2/bin> httpd -v
Server version: Apache/2.2.31 (Unix)
Server built:   Sep 24 2015 08:47:26
0
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
As Steve said. Apache backs in the config path, based on Distro you're using.

Apache provides the -f specifically for the purpose you describe.

Just locate the script used to start/stop Apache + add -f /path-to-custom-config directly into this script, so all Apache operations use the correct custom config file.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David AldridgeAuthor Commented:
Yes, it looks like there's no other way without using the -f.  I'll split the points with everyone that tried.

Thanks,
David
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.