I'm searching for a way to locate my httpd service configuration file outside of the /etc/httpd/config folder; for example in /test. Do you know how I can do that and still can start the service with systemctl start httpd ? Thanks
Asked
Active
Viewed 426 times
1 Answers
2
Option 1: If your web server is apache, you could use an include directive in your main httpd.conf file to include settings in a file at a custom path:
Include /test/custom.conf
Option 2: Apache has it's conf location set at compile time, however, it is possible to launch apache with a custom configuration file:
/usr/local/apache2/bin/apachectl -f /test/httpd.conf
This is assuming your apachectl is located in /usr/local/apache2/bin. To find out for sure:
# updatedb
# locate apachectl
This means you would need to alter the startup script for your apache server to launch with a command that specifies the -f parameter.

Rusan Constantin
- 114
- 3
-
Thanks :) Apachectl however won't work, it says -f is not longer supported. What works for me is httpd -f /path/httpd.conf – Gring Jul 26 '17 at 21:06