This is a discussion on Serve HTML file from /cgi-bin within the Apache Web Server forums, part of the Web Server and Related Forums category; My Apache configuration has the following directives: ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" <Directory "/var/...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
My Apache configuration has the following directives:
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" <Directory "/var/www/cgi-bin"> AllowOverride None Options FollowSymLinks Order allow,deny Allow from all </Directory> I'd like to be able to server a single HTLM file from this directory (index.html) to catch requests to the URL http://<servername>/cgi-bin/ However, Apache seems unhappy about this... probably because it's trying to execute my html file instead of serving it verbatim. Are there any configuration changes that I need to make to allow this, or am I going to have to alter my approach and create an index.pl file, instead? Thanks |
|
|||
|
"Dan Rumney" <danrumney@warpmail.net> schreef in bericht
news:48514eb7$0$30150$4c368faf@roadrunner.com... > My Apache configuration has the following directives: > > ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" > > <Directory "/var/www/cgi-bin"> > AllowOverride None > Options FollowSymLinks > Order allow,deny > Allow from all > </Directory> > > I'd like to be able to server a single HTLM file from this directory > (index.html) to catch requests to the URL http://<servername>/cgi-bin/ > > However, Apache seems unhappy about this... probably because it's trying > to execute my html file instead of serving it verbatim. Tha't's indeed what 'ScriptAlias ...' does for a good purpose: avoid exposure of a script's source > Are there any configuration changes that I need to make to allow this, You should not want to ... > or am I going to have to alter my approach and create an index.pl file, > instead? That is a better option ... index.html will do too: it is the inner first line that gets your Perl going. HansH |
|
|||
|
On 2008-06-12, Dan Rumney <danrumney@warpmail.net> wrote:
> My Apache configuration has the following directives: > > ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" > ><Directory "/var/www/cgi-bin"> > AllowOverride None > Options FollowSymLinks > Order allow,deny > Allow from all ></Directory> > > I'd like to be able to server a single HTLM file from this directory > (index.html) to catch requests to the URL http://<servername>/cgi-bin/ > > However, Apache seems unhappy about this... probably because it's trying > to execute my html file instead of serving it verbatim. > > Are there any configuration changes that I need to make to allow this, > or am I going to have to alter my approach and create an index.pl file, > instead? You can use a DirectoryIndex directive that points outside the current directory: DirectoryIndex /index.html --keith -- kkeller-usenet@wombat.san-francisco.ca.us (try just my userid to email me) AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt see X- headers for PGP signature information |
|
|||
|
>I'd like to be able to server a single
>HTLM file from this directory >(index.html) to catch requests to the >URL >http://<servername>/cgi-bin/ >However, Apache seems unhappy about >this... probably because it's trying to >execute my html file instead of serving it >verbatim. Try using an index.shtml |