Is it possible to serve .htm files from cgi-bin directory?
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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>
<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?
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.