3

I'm using apache on RHEL Linux server In my /etc/httpd/conf.d/httpd.conf there are two directives:

WSGIScriptAlias /apps /var/www/apps
<Directory /var/www/apps >
   Options MultiViews ExecCGI
   MultiviewsMatch Handlers
   SetHandler wsgi-script
   Order allow, deny
   allow from all
</Directory>

ScriptAlias /scripts /var/www/scripts
<Directory /var/www/scripts >
   Options MultiViews ExecCGI
   MultiviewsMatch Handlers
   SetHandler wsgi-script
   Order allow, deny
   allow from all
</Directory>

What is the difference? I understand that WSGIScriptAlias is restricted for running Python scripts and ScriptAlias also allows running perl scripts.

Can I always use ScriptAlias instead of WSGIScriptAlias? Are there any performance advantages of using WSGIScriptAlias instead of ScriptAlias?

Jiri Kadlec
  • 31
  • 1
  • 2

2 Answers2

4

ScriptAlias is for cgi-script handler in Apache. WSGIScriptAlias is equivalent for wsgi-script. If you want to mix them in the same directory, don't use either, use Alias, Options ExecCGI, AddHandler directives instead. See:

http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines#The_Apache_Alias_Directive

Graham Dumpleton
  • 6,090
  • 2
  • 21
  • 19
1

WSGIScriptAlias is a parameter used for the python module and they can't be used interchangeably.

Sven
  • 98,649
  • 14
  • 180
  • 226