Serve HTML file from /cgi-bin

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/...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-12-2008
Dan Rumney
 
Posts: n/a
Default Serve HTML file from /cgi-bin

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
  #2 (permalink)  
Old 06-12-2008
HansH
 
Posts: n/a
Default Re: Serve HTML file from /cgi-bin

"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


  #3 (permalink)  
Old 06-12-2008
Keith Keller
 
Posts: n/a
Default Re: Serve HTML file from /cgi-bin

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

  #4 (permalink)  
Old 06-12-2008
alpha ~ 1 ~ omega
 
Posts: n/a
Default Re: Serve HTML file from /cgi-bin

>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


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:43 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0