Here’s my situation. I’m setting up a development server and a production server on PHP Fog. I have one set of files on my local machine that I’d like to be able to work on and push to each of the 2 servers on PHP Fog.
I want my development server to be protected though, using traditional htpasswd/htaccess methods. This means the production server needs to ignore those two files in my working copy.
Is there a way to tell the production server to ignore those two files when a commit is made but let them go through when pushing to the development server?
I was looking in to this a while back as well and I used this article, it should explain how to use a single htaccess for multiple sites rather than worrying about git.
Blog post: “Single
.htaccessfile in your git repo for both your dev and production server” by Mark Alan EvansHe described the problem thusly:
AuthUserFileexpects an absolute path, but if you don’t start your path with a forward slash, it defaults to the directory you specify in yourhttpd.conffile asServerRoot.