How is Perl/Python/Ruby run on webserver?

Does it all run through CGI?
So you have to link !#usr/bin/interpreter top?

Reason I ask is because, I’m used to PHP just popping things into the public_html directory which I like.

Can you do this with perl/py/ruby? Or does it HAVE to be in the CGI directory? That would bother me a LOT.

So far as I know, no, you don’t HAVE to have stuff in the cgi-bin folder. That’s the traditional place for Perl, and others picked it up.

Modern use of Python use wsgi (web server gateway interface) and Ruby’s got Rack and Perl’s got the similar Plack (works with psgi, Perl’s version of wsgi). Okay, these are more for “web applications” than web scripts, but then again, what’s the difference?

Or does it HAVE to be in the CGI directory?

I believe so long as your server is configured correctly and knows where the scripts are and where the files are the script should be calling, you can put your programs anywhere you want (within reason). You can also have stuff in a folder called cgi-bin but use mod-rewrite to remove that from urls (if that’s the issue, tho it doesn’t sound like it).

I thought IronPython was C/Python, or Java Python or something… 'cause I vaguely remember an IronRuby out there : )

I’ve never worked with CGI or webservers (not that far yet, lawlz) so don’t take my word for any of it… and you can always ask on for what the options are for Perl.

You might want to check out this node, but it’s more talking about, “don’t try to roll your own” rather than the web app Plack-stuff (keep in mind this was posted back in 2001, before such things existed):

Yeah like CGI::Fast and/or [url=]mod_perl. Really, there are lots of fast-cgi modules for Perl…

This is actually where Perl got the accusation of being slow, when in fact it was just basic CGI slowness from the Bad Old Days of the web : )

One problem with CGI is that it’s very slow, that’s why all the programming languages mentioned now offer better ways to connect to the web server.

Hey cool this will be helpful some links. My eyes are about burned out now from reading so much :stuck_out_tongue: There is something called IronPython which works with .NET and plugs into VisualStudio, I found that impressive! I’ve never used VisualStudio anyway. Thanks!