General discussion

Locked

Apache distributed cgi-bin directory que

By Ron Carver ·
Runnning name virtual servers under apache, with redhat 6.0, the apache install is the standard installed with redhat (I am going to change this soon, but for right now it is still running this way). I can get distributed log files to work fine, but I cannot figure out how to have seperate cgi-bin directories. from RTFM, I have discovered 2 options for doing this, one kinda like this..

<Directory "/home/*/public_html/cgi-bin">
AllowOverride None
Options +ExecCGI
</Directory>

and I forgot the exact wording of the other option, however it was a line tag on the end of the virtual host set. At any rate, none of these are working. Am I forgetting something? do I need to take out the other <Directory> settings?

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Apache distributed cgi-bin directory que

by zeenox In reply to Apache distributed cgi-bi ...

the options parameter is supposed to be without the +, so try this:

<Directory "/home/*/public_html/cgi-bin">
AllowOverride None
Options ExecCGI
</Directory>

Collapse -

Apache distributed cgi-bin directory que

by Ron Carver In reply to Apache distributed cgi-bi ...

The question was auto-closed by TechRepublic

Collapse -

Apache distributed cgi-bin directory que

by Victor_F In reply to Apache distributed cgi-bi ...

zeenox is correct but, also you could just add a ScriptAlias directive within the <VirtualHost> directive and make sure that it goes after the closing </directory> for the cgi-bin directory for each virtualhost, using your example the whole entry would be:

<VirtualHost www.whatever.org>
ServerAdmin webmaster@whatever.org
DocumentRoot /home/whatever/public_html
ServerName www.whatever.org
ErrorLog etc....
LogFormat etc....
CustomLog etc...

<Directory /home/whatever/public_html/cgi-bin>
AllowOverride None
Options ExecCGI
</Directory>
ScriptAlias /cgi-bin/ /home/whatever/cgi-bin/
</VirtualHost>

Final note: make sure that your cgi-bin directory is chmoded 755 to allow execution.
Hope this helps.

Collapse -

Apache distributed cgi-bin directory que

by Ron Carver In reply to Apache distributed cgi-bi ...

The question was auto-closed by TechRepublic

Collapse -

Apache distributed cgi-bin directory que

by spepper In reply to Apache distributed cgi-bi ...

Solution number 2 is correct, but may be incomplete depending on your setup. You may need to add the follwoing line after the ScriptAlias line:

AddHandler cgi-script .cgi

Collapse -

Apache distributed cgi-bin directory que

by Ron Carver In reply to Apache distributed cgi-bi ...

The question was auto-closed by TechRepublic

Collapse -

Apache distributed cgi-bin directory que

by Ron Carver In reply to Apache distributed cgi-bi ...

This question was auto closed due to inactivity

Back to Linux Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums