possible to set WSGISCRIPTALIAS from the command line

15 views
Skip to first unread message

Danny

unread,
Sep 11, 2012, 6:49:54 PM9/11/12
to mod...@googlegroups.com
Howdy,

I'm curious if it is possible to change the location of the wsgi file from the command line. It seems impossible from /etc/init.d/httpd but more promising from:
 /usr/sbin/apachectl -c "WSGISCRIPTALIAS / /mypath/debug_wsgi.py"

Only this doesn't seem to actually work. I'm trying to run a debug version of my wsgi.py file and it would be nice to specify from the command line. I can always create a second apache conf file with a different VirtualHost pointing to the correct wsgi file but I am trying to get around that.

thanks,
Danny

Graham Dumpleton

unread,
Sep 12, 2012, 3:30:33 AM9/12/12
to mod...@googlegroups.com
Working from memory here, but look at the -D option to httpd. Apache has a basic macro replacement mechanism you might be able to use. You may have to use it in conjunction with mod_macro.

Again, hard for me to give a better answer right now.

Graham
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To view this discussion on the web visit https://groups.google.com/d/msg/modwsgi/-/5ibNt_fFrXMJ.
To post to this group, send email to mod...@googlegroups.com.
To unsubscribe from this group, send email to modwsgi+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.

Danny

unread,
Sep 12, 2012, 2:45:52 PM9/12/12
to mod...@googlegroups.com
thanks for the suggestion. I hadn't thought of modifying the virtualhost with hardcoded <IfDefine> stuff. That works great.

Danny

Jason Garber

unread,
Sep 12, 2012, 5:19:10 PM9/12/12
to mod...@googlegroups.com
One thing we do is auto-generate the VirtualHost files from a template, and customize it to the installation, purpose (development, staging, production), and user.  A single command on my end regenerates this file, diffs it, restarts apache -- which results in complete consistency between developing and going live.

-J

On Wed, Sep 12, 2012 at 2:45 PM, Danny <danny_...@yahoo.com> wrote:
thanks for the suggestion. I hadn't thought of modifying the virtualhost with hardcoded <IfDefine> stuff. That works great.


Danny

--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To view this discussion on the web visit https://groups.google.com/d/msg/modwsgi/-/U1SM_lIhc-IJ.
Reply all
Reply to author
Forward
0 new messages