|
101 | 101 |
|
102 | 102 | # Set the Apache (run) service user/group |
103 | 103 | if [[ ${OPTS_SUEXECUSERGROUP} == true ]]; then |
104 | | - sed -i -e "s~^User .*$~User ${OPTS_SERVICE_USER_GROUP}~g" \ |
105 | | - -e "s~^Group .*$~Group ${OPTS_SERVICE_USER_GROUP}~g" /etc/httpd/conf/httpd.conf |
106 | | - sed -i -e 's~#SuexecUserGroup \(.*\)$~SuexecUserGroup \1~g' ${OPTS_APP_HOME_DIR}/vhost.conf |
107 | | - sed -i -e 's~#SuexecUserGroup \(.*\)$~SuexecUserGroup \1~g' ${OPTS_APP_HOME_DIR}/vhost-ssl.conf |
| 104 | + sed -i \ |
| 105 | + -e "s~^User .*$~User ${OPTS_SERVICE_USER_GROUP}~g" \ |
| 106 | + -e "s~^Group .*$~Group ${OPTS_SERVICE_USER_GROUP}~g" \ |
| 107 | + /etc/httpd/conf/httpd.conf |
| 108 | + sed -i \ |
| 109 | + -e 's~#SuexecUserGroup \(.*\)$~SuexecUserGroup \1~g' \ |
| 110 | + -e 's~app/bin/php-wrapper~app-bin/php-wrapper~g' \ |
| 111 | + ${OPTS_APP_HOME_DIR}/vhost.conf \ |
| 112 | + ${OPTS_APP_HOME_DIR}/vhost-ssl.conf |
108 | 113 | chown -R 502:502 /var/{www/app-bin,run/mod_fcgid} |
109 | 114 | else |
110 | | - sed -i -e "s~^User .*$~User apache~g" \ |
111 | | - -e "s~^Group .*$~Group apache~g" /etc/httpd/conf/httpd.conf |
112 | | - sed -i -e 's~\([^#]\)SuexecUserGroup \(.*\)$~\1#SuexecUserGroup \2~g' ${OPTS_APP_HOME_DIR}/vhost.conf |
113 | | - sed -i -e 's~\([^#]\)SuexecUserGroup \(.*\)$~\1#SuexecUserGroup \2~g' ${OPTS_APP_HOME_DIR}/vhost-ssl.conf |
| 115 | + sed -i \ |
| 116 | + -e "s~^User .*$~User apache~g" \ |
| 117 | + -e "s~^Group .*$~Group apache~g" \ |
| 118 | + /etc/httpd/conf/httpd.conf |
| 119 | + sed -i \ |
| 120 | + -e 's~\([^#]\)SuexecUserGroup \(.*\)$~\1#SuexecUserGroup \2~g' \ |
| 121 | + -e 's~app/bin/php-wrapper~app-bin/php-wrapper~g' \ |
| 122 | + ${OPTS_APP_HOME_DIR}/vhost.conf \ |
| 123 | + ${OPTS_APP_HOME_DIR}/vhost-ssl.conf |
114 | 124 | chown -R apache:apache /var/{www/app-bin,run/mod_fcgid} |
115 | 125 | fi |
116 | 126 |
|
117 | | -# Update any existing instances of php-wrapper path in the Virtual Host |
118 | | -sed -i -e 's~app/bin/php-wrapper~app-bin/php-wrapper~g' ${OPTS_APP_HOME_DIR}/vhost.conf |
119 | | -sed -i -e 's~app/bin/php-wrapper~app-bin/php-wrapper~g' ${OPTS_APP_HOME_DIR}/vhost-ssl.conf |
120 | | - |
121 | 127 | echo "Loading Apache modules." |
122 | 128 | for MODULE in ${APACHE_LOAD_MODULES}; do |
123 | 129 | echo " - ${MODULE}" |
|
0 commit comments