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?
 
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
 
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 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.