Operating System - Linux
1828537 Members
2590 Online
109980 Solutions
New Discussion

how to configure apache for parsing files with Ending .html ?

 
SOLVED
Go to solution
'chris'
Super Advisor

how to configure apache for parsing files with Ending .html ?

hi

how to configure Apache httpd.conf for parsing files with Ending .html ?
I'm using Apache 1.3.27 installed
on linux SuSE 8.2
and I need a test php script in order to examine.

regards
chris



3 REPLIES 3
Patrick Van Humbeeck
Valued Contributor
Solution

Re: how to configure apache for parsing files with Ending .html ?

add this to the conf file :

AddType text/html .html

- your request is not very clear, if you need php to parse .html files then add :
AddType application/x-httpd-php .html
U.SivaKumar_2
Honored Contributor

Re: how to configure apache for parsing files with Ending .html ?

Hi,

apache will parse .html files by default.

http://127.0.0.1/index.html

To test your php installation with apache web server. create a file named test.php under /var/www/cgi-bin/ directory.

#vi /var/www/cgi-bin/test.php

( type the below contents )

Today's date is:

save the file.

Now

http://127.0.0.1/cgi-bin/test.php

or from some other machine.

http://xxx.xxx.xxx.xxx/cgi-bin/test.php

where xxx.xxx.xxx.xxx is the ip address of the apache server.

You should be able to get System's date in the browser. Then your php is ok.

regards,

U.SivaKumar






Innovations are made when conventions are broken
'chris'
Super Advisor

Re: how to configure apache for parsing files with Ending .html ?

hi

sorry, my question was not clear.
I mean to pars php files with ending .html

with

AddType application/x-httpd-php .html

is working.

thanks
chris