DaedalusFall
DaedalusFall

Reputation: 8575

Ignore Apache directive 'ScriptInterpreterSource' on linux

I have a small python script to produce css files (using PyScss). The rest of the website is PHP.

The live website is hosted on a linux server, but the code also needs to work on Macs and Windows machines (for development).

I decided that a good old fashioned cgi script would be fine (the results will be cached further down the line), prtially because my windows setup (EasyPHP) doesn't seem to come with mod_fcgid (I can't use mod_wsgi or mod_python in this instance as I need a more recent python than the one built into the apache we are using). To get this to work I needed to use ScriptInterpreterSource (hoping that linux/mac would just use the shebang), but when doployed on the linux server I get an error:

Invalid command 'ScriptInterpreterSource', perhaps misspelled or defined
   by a module not included in the server configuration

How can I get linux (and mac) apache to ignore the directive (or can you suggest some other solution)?

Thanks.

Upvotes: 0

Views: 550

Answers (1)

Graham Dumpleton
Graham Dumpleton

Reputation: 58563

Try using:

<IfModule mpm_winnt_module>
ScriptInterpreterSource ....
</IfModule>

That directive would then only be used when using Apache on Windows and ignored otherwise.

Upvotes: 1

Related Questions