Red Hat Bugzilla – Bug 1288397
[RFE] Add LoadModule xsendfile to httpd.conf
Last modified: 2016-01-12 17:02:38 EST
Description of problem:
How to add xsendfile module in Openshfit Online application. At present we can't edit httpd.conf file so as to add below content :
LoadModule xsendfile_module modules/mod_xsendfile.so
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. httpd.conf is read only at present :
-rw-r--r--. 1 root 565fd0e92d5271ee99000020 9975 Dec 3 00:19 httpd.conf
drwxr-xr-x. 2 root 565fd0e92d5271ee99000020 46 Dec 3 00:19 .
-rw-r--r--. 1 root 565fd0e92d5271ee99000020 10150 Dec 3 00:19 httpd_nolog.conf
drwxr-xr-x. 5 root 565fd0e92d5271ee99000020 56 Dec 3 00:19 ..
Cant edit httpd.conf file.
Adding the above content in httpd.conf file should work and load the module
The httpd.conf file being read-only is very intentional. The files in etc/conf.d are writable by the gear, but they are intended to be autogenerated (and the conf.d directory itself is not writable by the gear, to prevent the addition of extra config files).
I think that what you really mean to ask for is an option to allow the configuration lines you've specified to be written to one of the autogenerated files -- probably conf.d/openshift.conf ; I think that an environment variable might be the best way to accomplish this, as there are security implications to turning this on, and not every user will want it.
Thanks for the update.
yes, Probably a way to enable any module in web framework. In my customer's case it is xsendfile module.
Having a environment variable to enable the modules would be a good way to accomplish this.
I've been talking this over with the team, trying to determine if this is an RFE - it is. This does seem like a useful feature to add, but the process for adding a new feature like this can take some time.
A potentially quicker solution would be for the customer to resolve this by creating a custom cartridge: https://developers.openshift.com/en/get-involved-extend-openshift.html#_build_a_cartridge
The user seems to be working with the Python cartridge, so they could start by creating a new github repo based on the official origin-server python cart code here: https://github.com/openshift/origin-server/tree/master/cartridges/openshift-origin-cartridge-python
From there, they could add the necessary logic to enable XSendFile and set the correct XSendFile path to the openshift.conf.erb template: https://github.com/openshift/origin-server/blob/master/cartridges/openshift-origin-cartridge-python/usr/versions/shared/etc/conf.d/openshift.conf.erb
The user will need to take care not to hardcode the XSendFile path, but rather derive it from env vars, e.g. $OPENSHIFT_REPO_DIR
The v3 Online Beta will provide far more latitude for customizing apache configs, among other things. Since this issue will be addressed in a future release, I'm going to close the bug as DEFERRED.