Saturday, 17 August 2013

Why must i have `WSGIScriptAlias` for each script ? what about php style anything.php ? anything.wsgi?

Why must i have `WSGIScriptAlias` for each script ? what about php style
anything.php ? anything.wsgi?

I am trying to understand , why is it that i first do this..
# ENABLE WSGI
cat > /etc/httpd/conf.d/wsgi.conf << EOF
LoadModule wsgi_module modules/mod_wsgi.so
EOF
and then in my httpd.conf's included file i must do this..
NameVirtualHost *:80
DocumentRoot "/media/1/1/1/"
DirectoryIndex index.wsgi
WSGIScriptAlias / /media/1/1/1/index.wsgi
you see, that last line is like making the assumption that i didn't
already load a mod_wsgi module to apache.
so i mean if the module is loaded, then shouldn't anything with .wsgi work
the same way php works with anything . php ?
does this mean i have to add a brand new line for each .wsgi script ?
doesn't this slow things down or something ?
because once the module is loaded it should be like a " connected module "
kind of a concept and thus "part of the apache".
so this means if i have 20 pages on my web site... i have to do like..
WSGIScriptAlias / /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
WSGIScriptAlias /index1 /media/1/1/1/index.wsgi
isn't this gonna slow things down ? also make things confusing ?
how come in php it isn't like this?
i mean if the module is loaded.. what else is there to say?
why must there be an "alias" if the module is already loaded ?

No comments:

Post a Comment