Perl is b0rked ... what do I do to fix it?

evildre

[H]F Junkie
Joined
Oct 23, 2000
Messages
13,345
I moved my website out of the back of the shop I work at a while ago, but I haven't had the need (or want, for that matter) to run Perl scripts on my website until recently. I want to get Greymatter (or a similar blogger that does not require database connectivity in any way, shape, or form) up and running on my site. The server's running OpenBSD 3.6.

Now, I know Perl is installed on it because when I log in and run a test script, I get the desired output. However, when I try to get to the test script through a web browser, I see the source code instead of the expected output. The script in question has been chmoded to 755 and has the correct Perl path on the first line. How do I fix this?
 
it needs to be in the cgi-bin for apache, or you have to set up whatever directory it's in to allow cgi scripts to run.
 
tim_m said:
it needs to be in the cgi-bin for apache, or you have to set up whatever directory it's in to allow cgi scripts to run.
It's kinda funny, though .. I don't have a cgi-bin directory, but when I create one I can never see anything in it. The damn thing always 404's on me.
 
evildre said:
It's kinda funny, though .. I don't have a cgi-bin directory, but when I create one I can never see anything in it. The damn thing always 404's on me.
Your apache config needs a "scriptalias" line like this:
Code:
ScriptAlias /cgi-bin/ /var/www/localhost/cgi-bin/
and then scripts in /var/www/localhost/cgi-bin/ will be run rather than displayed.
 
Back
Top