Skip to content

Use ${APACHE_LOG_DIR} instead of /var/log/apache2 #4104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Use ${APACHE_LOG_DIR} instead of /var/log/apache2 #4104

wants to merge 2 commits into from

Conversation

noppelmax
Copy link
Contributor

Q A
Doc fix? yes
New docs? no
Applies to all
Fixed tickets none

It would be a better solution to use envs in the configfile.

@xabbuh
Copy link
Member

xabbuh commented Aug 7, 2014

👍

@weaverryan
Copy link
Member

Is the APACHE_LOG_DIR environment variable consistently set in all Apache environments? I want this to work for as many people as possible without a headache. If APACHE_LOG_DIR is always set, then clearly that's better (since your real log dir will differ in installations).

Thanks!

@noppelmax
Copy link
Contributor Author

I did some research and found that it is not provided by the apache2-bin. But apache2-bin is a non-optional dependency of the gnome desktop and APACHE_LOG_DIR seems to be provided by gnome and some other programs. Means, i cant give you a security that it is present on ALL systems.

@weaverryan
Copy link
Member

Hmm, I'm personally -1 on this. I had actually never heard of this variable, and I think it'll cause confusion. Even if it may be a best practice, I don't want to confuse people :).

@xabbuh
Copy link
Member

xabbuh commented Aug 15, 2014

After @weaverryan's question I searched a bit for this and it seems that the way to use an environment variable is mainly used in Linux distributions (especially Debian based ones). So, having this by default may confuse a lot of people not using such distributions. What do you think about adding a tip stating that your distribution may support this environment variable, but that you have to check it?

@weaverryan
Copy link
Member

@xabbuh Awesome, thanks for the research! I would say that we should not make this change then. At most, we could add a note below the code block - something like: "Some Apache installations have an environment variable for the log directory" - followed by how one of these lines would look with the APACHE_LOG_DIR variable.

@noppelmax
Copy link
Contributor Author

That would be a good idea i think. The ones that giv something about having a clean system und want to use the variables will use it and the other ones wont be confused. +1 for this solution.

@weaverryan
Copy link
Member

@xamgreen Perfect! Do you want to under your change then and add a note below?

Thanks!

Added a note, that for systems, which support the APACHE_LOG_DIR env, the user can use it for the logging-path.
@weaverryan
Copy link
Member

I've made one tiny little tweak to the language, but looks great. Thanks @xamgreen!

weaverryan added a commit that referenced this pull request Oct 19, 2014
* 2.3:
  [#4104] Re-organizing language in one sentence
  APACHE_LOG_DIR note added
  Use ${APACHE_LOG_DIR} instead of /var/log/apache2
weaverryan added a commit that referenced this pull request Oct 19, 2014
* 2.5:
  [#4104] Re-organizing language in one sentence
  APACHE_LOG_DIR note added
  Use ${APACHE_LOG_DIR} instead of /var/log/apache2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants