Apache config files from Apps

kappy
Posts: 5
Joined: Fri Sep 09, 2011 7:56 am

Apache config files from Apps

Postby kappy » Fri Sep 09, 2011 8:04 am

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

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Apache config files from Apps

Postby bigfoot65 » Fri Sep 09, 2011 12:19 pm

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.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

kappy
Posts: 5
Joined: Fri Sep 09, 2011 7:56 am

Re: Apache config files from Apps

Postby kappy » Fri Sep 09, 2011 3:40 pm

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.

kappy
Posts: 5
Joined: Fri Sep 09, 2011 7:56 am

Re: Apache config files from Apps

Postby kappy » Fri Sep 09, 2011 5:41 pm

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 :)

Who is online

Users browsing this forum: No registered users and 13 guests