apache .html

i installed apache
and i save my .cgi scripts in /cgi-bin directory...
when i save .html files on /chi-bin directory and open it from browser, i get

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@admin.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

If you configured your /cgi-bin using ScriptAlias (I believe this is the case for the default httpd.conf), then it expects everything in that directory to be a script.  So it is trying to execute your html page as a CGI and failing.

"The ScriptAlias directive has the additional effect of marking the target directory as containing only CGI scripts."

If you want to put your CGI and static content in the same directory, then don't use ScriptAlias, use a file extension to mark CGIs instead, such as:

   AddHandler cgi-script .cgi

The directory that your CGI scripts are in needs to have:
   Options ExecCGI.

perlperlAuthor Commented:
this is what i have in conf file

AddHandler cgi-script .cgi

# For files that include their own HTTP headers:
#AddHandler send-as-is asis

# For server-parsed imagemap files:
#AddHandler imap-file map

# For type maps (negotiated resources):
# (This is enabled by default to allow the Apache "It Worked" page
#  to be distributed in multiple languages.)
AddHandler type-map var

# Filters allow you to process content before it is sent to the client.
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)

#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml

what changes do i need to run .html files from cgi-bin directory
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

'what changes do i need to run .html files from cgi-bin directory'
Why to 'run' .html files? May be you like to browse them?
If you want this,
ScriptAlias /cgi-bin ...
Alias /cgi-bin ...

and add directory section for "/usr/local/apache/cgi-bin" or where your real scripts are located
<Directory /usr/local/apache/cgi-bin>
  Options ExecCGI

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
perlperlAuthor Commented:
this worked and i can run html pages from cgi-bin directory but i cannot run cgi pages

You don't have permission to access /cgi-bin/test.cgi on this server.

perlperlAuthor Commented:
this is my conf file

PidFile logs/httpd.pid
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild  0
Listen 8080
LoadModule access_module modules/mod_access.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_module modules/mod_auth.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule imap_module modules/mod_imap.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule userdir_module modules/mod_userdir.so
ServerAdmin test@blah.com

ServerName blahcom:8080

UseCanonicalName Off
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"

<Directory />
    Options FollowSymLinks +ExecCGI
    AllowOverride None
<Directory "C:/Program Files/Apache Group/Apache2/htdocs">

    Options Indexes FollowSymLinks

    AllowOverride None
    Order allow,deny
    Allow from all
UserDir "My Documents/My Website"

DirectoryIndex index.cgi index.html index.htm
AccessFileName .htaccess
<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
TypesConfig conf/mime.types
DefaultType text/plain

<IfModule mod_mime_magic.c>
    MIMEMagicFile conf/magic
HostnameLookups Off
ErrorLog logs/error.log

LogLevel warn

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog logs/access.log common
ServerTokens Full

ServerSignature On

Alias /icons/ "C:/Program Files/Apache Group/Apache2/icons/"

<Directory "C:/Program Files/Apache Group/Apache2/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "C:/Program Files/Apache Group/Apache2/manual$1"

<Directory "C:/Program Files/Apache Group/Apache2/manual">
    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all

    <Files *.html>
        SetHandler type-map

    SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|ru)/ prefer-language=$1
    RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2

Alias /cgi-bin/ "C:/Program Files/Apache Group/Apache2/cgi-bin/"
<Directory "C:/Program Files/Apache Group/Apache2/cgi-bin">
    Options ExecCGI
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all

what changes are required to run both htmland cgi pages from cgi-bin directory
perlperlAuthor Commented:
i added this two line
AddType text/html .shtml
AddHandler server-parsed .shtml
didn't worjked
I don't see:

AddHandler cgi-script .cgi
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.