Skip to content

Commit

Permalink
Fix for combination of MSSQL driver and autofs filesystem for /home
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmontalvo3 committed Jul 6, 2018
1 parent 0a6da45 commit 39b9e77
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/roles/apache-php/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
notify:
- restart apache

- name: Ensure Apache environment variables set properly
template:
src: etc-sysconfig-httpd.j2
dest: /etc/sysconfig/httpd
notify:
- restart apache

- name: Install PHP
include: php.yml
# http://docs.ansible.com/ansible/playbooks_roles.html#dynamic-versus-static-includes
Expand Down
39 changes: 39 additions & 0 deletions src/roles/apache-php/templates/etc-sysconfig-httpd.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
# This file can be used to set additional environment variables for
# the httpd process, or pass additional options to the httpd
# executable.
#
# Note: With previous versions of httpd, the MPM could be changed by
# editing an "HTTPD" variable here. With the current version, that
# variable is now ignored. The MPM is a loadable module, and the
# choice of MPM can be changed by editing the configuration file
# /etc/httpd/conf.modules.d/00-mpm.conf.
#

#
# To pass additional options (for instance, -D definitions) to the
# httpd binary at startup, set OPTIONS here.
#
#OPTIONS=

#
# This setting ensures the httpd process is started in the "C" locale
# by default. (Some modules will not behave correctly if
# case-sensitive string comparisons are performed in a different
# locale.)
#
LANG=C


#
# This is required by Meza when using MSSQL Server Drivers [1] and if using
# autofs to mount /home directories. The UnixODBC driver otherwise looks for the
# file /home/.odbcinst.ini, and autofs will try to mount that file and creates a
# long lag that can cause `systemctl start httpd` to timeout. Ref [2]. This
# likely becomes obsolete when #750 [3] is closed
#
# [1] https://github.com/Microsoft/msphpsql
# [2] https://github.com/Microsoft/msphpsql/issues/805
# [3] https://github.com/enterprisemediawiki/meza/issues/750
#
HOME=/usr/share/httpd

0 comments on commit 39b9e77

Please sign in to comment.