LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-25-2008, 11:09 AM   #1
zoonalex
LQ Newbie
 
Registered: Aug 2003
Location: Mexico
Distribution: Fedora 7
Posts: 5

Rep: Reputation: 0
Question Is it possible to serve .htm files from cgi-bin directory?


Hi all!

I'm trying to serve .htm file and cgi files from cgi-bin directory, is it possible? I'm using Apache/1.3.26 (Unix)

Actually I can serve cgi files but not .htm files, this is what I changed from httpd.conf:


<IfModule mod_alias.c>
Alias /icons/ "/usr/local/apache/icons/"

<Directory "/usr/local/apache/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Alias /manual/ "/usr/local/apache/htdocs/manual/"

<Directory "/usr/local/apache/htdocs/manual">
Options Indexes FollowSymlinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

# ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"

#
# <Directory "/usr/local/apache/cgi-bin/">
# AllowOverride None
# Options None
# Order allow,deny
# Allow from all
# </Directory>


ScriptAlias /cgi-bin/cons/ "/usr/local/apache/htdocs/cgi-bin/cons/"

<Directory "/usr/local/apache/htdocs/cgi-bin/cons/">
AllowOverride None
Options +ExecCGI
Order allow,deny
Allow from all
AddHandler server-parsed .html .htm
</Directory>
</IfModule>


As you have noticed I changed cgi-bin to htdocs and under cgi-bin I created cons. Cons have htm files but also cgi files both types have .htm extension so I think it's confusing to apache to know what files it will serve. Is it possible to serve both files with the same extension?

Thanks a lot for your help!
 
Old 12-02-2008, 04:53 PM   #2
tospo
LQ Newbie
 
Registered: Dec 2007
Posts: 17

Rep: Reputation: 0
I don't think that's possible because the ScriptAlias directive tells Apache that everything in that directory is a script.
Why do you want to serve static files from cgi-bin?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I can't find the CGI-BIN directory and http.conf file is blank Dapernia Linux - Software 1 10-02-2007 11:52 PM
I can't find the CGI-BIN directory and http.conf file is blank Dapernia Programming 1 10-01-2007 03:23 PM
CGI-bin Directory Request = 403 Forbidden King4lex Linux - Server 1 04-10-2007 10:43 PM
Cannot access cgi-bin directory for Nagios hywaydave23 Linux - Software 1 10-12-2005 07:16 AM
Question on virtual hosts and CGI-BIN directory cgchris99 Linux - General 9 10-11-2002 12:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration