Changing default httpd.conf

If I want to make changes to apache's default httpd.conf can I do something like:-

Code:
cat <<EOF    >/usr/localetc/apache24/modules.d/extra.conf                                                                                                                                                                        LoadModule rewrite_module modules/mod_rewrite.so
EOF

and will this get pulled in automatically when apache starts up?
 
Code:
# Third party modules
IncludeOptional etc/apache24/modules.d/[0-9][0-9][0-9]_*.conf
That's already in the default httpd.conf.

That's where I enable modules, for example:
Code:
dice@riviera:~ % cd /usr/local/etc/apache24/modules.d/
dice@riviera:/usr/local/etc/apache24/modules.d % ll
total 9
-rw-r--r--  1 root wheel 326 Jan 16  2021 001_php-fpm.conf
-rw-r--r--  1 root wheel 447 Jul 20 12:22 README_modules.d
dice@riviera:/usr/local/etc/apache24/modules.d % cat 001_php-fpm.conf
LoadModule proxy_module libexec/apache24/mod_proxy.so
LoadModule proxy_fcgi_module libexec/apache24/mod_proxy_fcgi.so

<IfModule proxy_fcgi_module>
  <IfModule dir_module>
     DirectoryIndex index.php
  </IfModule>
  <FilesMatch "\.(php|phtml|inc)$">
     SetHandler "proxy:fcgi://127.0.0.1:9000"
  </FilesMatch>
</IfModule>
 
Back
Top