cgi-bin question [SOLVED]

The last step for getting my site up is the cgi-bin, and I have it half-way working (strangely). I can try to access it via my domain.org/cgi-bin, get the proper permission error; but the files within the -bin show up if I access them through the URL. When I login on the frontend, I get a "Cannot Open File at cgi-bin/file.pl". The entire site is built in Perl. I have tried the symbolic links to the -bin, ScriptAlias, and all of my files are chmod 755. (The one's not in the -bin work fine).

The following is in my apache2.conf:````

Include generic snippets of statements

Include /etc/apache2/conf.d/

Include the virtual host configurations:

Include /etc/apache2/sites-enabled/

Server Name

ServerName site.org

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

This is my /etc/apache2/sites-available/default/ file:

ServerAdmin webmaster@localhost

    DocumentRoot /var/www/
    <directory>Options FollowSymLinks
            AllowOverride None</directory> 
    <directory var="" www="">Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all</directory> 

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <directory "="" usr="" lib="" cgi-bin"="">AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all</directory> 


````

Was wondering if anyone knew how to properly set up the cgi-bin.

1 Reply

Grr, thought mod_perl might help, but didn't.

EDIT: Officially went through all my code, and it turns out, that the cgi-bin was working fine, but there was a problem with actual code making files. When I moved my files from my old hosting to my VPS, the directories were different, so it was caused by a /dir/ needing to be dir/.

And mod_perl did help, too. Fixed up a different error I was having, yay.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct