0

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

Gring
  • 318
  • 3
  • 19

1 Answers1

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.

  • 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