Page 1 of 1

Apache config files from Apps

Posted: Fri Sep 09, 2011 8:04 am
by kappy
Hi,

I'm building a script to package an App. On the final state of the app, I need to add some lines to the config file on /etc/httpd/conf.d/xxxx-web-app.conf that aren't possible on a custum .htaccess file.

Namely, I need to add:
WSGIPAssAuthorization On
WSGIScriptAlias "/" "...... path of the web-app/.../script.wsgi"

Also, I need to change the directory and the document root to a sub dir of the html dir.

Is this achievable from a script running as apache during the app install, since the script is being run with apache identity

Re: Apache config files from Apps

Posted: Fri Sep 09, 2011 12:19 pm
by bigfoot65
If you cannot add it to the custom web app options, then its not possible. The .conf file is not created until the app install completes. The only way to modify the .conf file is to have a script that will need to be run manually.

This is something we are looking into for future improvements, but it may be a while. There may be another way to package this app to minimize what needs to be changed in the .conf file.

Re: Apache config files from Apps

Posted: Fri Sep 09, 2011 3:40 pm
by kappy
that's quite a limiting factor.

if the conf file is generated from a template, why not let the apps provide an override to it.

for exemple, the install procedure could look for a special scrafted file with tokens (similiar to hda_install_file script) and then generate the final conf file. If it wouldn't find the file, then the conf file would be the default generated.

It shouldn't be that hard. I'll try to look into that.

Re: Apache config files from Apps

Posted: Fri Sep 09, 2011 5:41 pm
by kappy
stupid of me... this is already happening with the key APP_CUSTOM_OPTIONS. The same you mentioned...

From the wiki I got the idea that it was to fill up the .htaccess file.

But since this key isn't possible to replace the app dir, I'm looking for a more creative way to install the app :)