AlvinV. AlvinV. - 5 months ago 19
Bash Question

How to edit Apache configuration

I'd like to edit the Apache configuration on Linux so that the changes of every git pull doesn't reflect right away.

I'd like it to only stage after Apache is restarted.

What would be the best approach to this?

Answer

I wouldn't change the Apache configuration, but rather what Apache manages.

It can show the content of a git repo, but that should not be the one where the changes are done.

You can have two repos:

  • one for the changes
  • one for reflecting the changes when Apache restart (ie, a git pull from the first)

That is:

git clone first/repo path/to/second/repo
# make Apache serve path/to/second/repo

When restarting Apache, add before the apachectl start:

cd path/to/second/repo
git pull
Comments