I have two servers, one in production and one for development.
The production server is Solaris, dev is FreeBSD. Because of this, python is installed in different directories.
I'm using Python right now for making CGI scripts, and needing to remember to swap my hashbangs when I copy from dev to production is a little annoying (Same issue for SVN updates depending on which server I'm comitting from).
Is there a way to configure apache so that I no longer need to hashbangs? Like, if it would lauch python and supply the CGI script for it? Might be a bit of a stretch, but no harm in asking
Not exactly what you're looking for, since the solution has nothing to do with Apache, but try setting your hashbang to:
And then for the user that runs Apache on each machine make sure that Python is referenced in the user's path such that the /usr/bin/env python command runs the right version of Python.
you could always create a symlink to python wherever you're more used to setitng your hashbang...
The following snippet should work:
To understand what these three lines actually do, you should read the respective documentation sections: