Forum

Hiawatha CGI Issues (Hiawatha + Argus)

Carpe
20 February 2015, 21:42
Hiawatha version: 9.12
Operating System: Debian Sid 3.16.0-4-amd64
Argus: 3.7

I am trying to get Argus [argus.tcp4me.com] running on Hiawatha, but for some reason I can't get the CGI stuff to work.

I get normal status report from argusd, so I don't think it's an argus problem, I think I've borked up the settings for CGI somehow.

Here is my hiawatha.conf [hastebin.com]
Carpe
20 February 2015, 23:27
And if I go to IP/argus I get the arguscgi file in text mode but no actual CGI interface.
Hugo Leisink
21 February 2015, 19:09
It looks like the Argus CGI script has no extension. Use the NoExtensionAs setting to handle this. Argus is a Perl script, right?
NoExtensionAs = pl


Btw, the hostname of the virtual host in your configuration file has is the same as the hostname of the default host. Each host should have a unique hostname.
Carpe
25 February 2015, 16:16
Does the NoExtensionAs go inside the hiawatha.conf under Virtual Hosts? Here is my other question, where does it specify the directory to look for cgi scripts, eg in apache you have a script alias that redirects to /usr/cgi-bin or something like that and then you can put your scripts in there and it serves them all. Where do I put the scripts I want to run?
Hugo Leisink
25 February 2015, 16:31
The NoExtensionAs is a VirtualHost setting.
VirtualHost {
...
NoExtensionAs = pl
}

Hiawatha doesn't work with cgi-bin. That's pre-historic and only used in the 90's. You can place your CGI programs anywhere you like.
Carpe
25 February 2015, 16:58
Thank you very much for your quick response. I can already tell that hiawatha is just what I've been looking for, I just need to take the time to retrain myself from apache. By the way, the fact that it is GPL was a major factor in my decision to use it, if that makes any difference.

Anyway, I now have it so that when I go to a test perl file, even if it is set to executable, the browser just wants to download it instead of execute it. Any ideas?

My current hiawatha.conf: http://sprunge.us/IeOU

Currently tried serving files from /var/www and /var/www/cgi-bin (I found some other post where you explain why the cgi-bin isn't needed, so I will be removing it shortly)

Carpe
25 February 2015, 17:22
Problem fixed!

While testing I uninstalled apache via apt (Debian 7) but for some reason it was still trying to bind to the interface. /etc/init.d/apache2 stop and now my scripts are working with the above config.

Thanks for your help Hugo.
This topic has been closed.