Default type

This is a discussion on Default type within the Apache Web Server forums, part of the Web Server and Related Forums category; I have apache set up to serve for a local intranet. I have an "index.html" in the ...


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-26-2003
Jim Witt
 
Posts: n/a
Default Default type

I have apache set up to serve for a local intranet.

I have an "index.html" in the root folder.
If I type "http://myintranet/" into browser, the index.html page comes
up (note that "index.html" was NOT included in address)

I have apache set up to correctly serve .php pages (php as a module).
If I enter an explicit address ending ".php" the page is served fine.

Is there any way to set apache so that "http://myintranet/" would cause
apache to serve "index.php"?

I've tried setting "DefaultType application/x-httpd-php".

  #2 (permalink)  
Old 06-26-2003
Joshua Nixon
 
Posts: n/a
Default Re: Default type

edit httpd.conf like for DirectoryIndex and add index.php to the end.

DirectoryIndex index.html index.html.var index.php

as it says in the httpd.conf comments - this will tell apache which doc
it should serve when it receives a directory request. if you'd rather it
serve the .php file than the .html file, delete the index.html file from
the line, or delete it from the directory.

-josh

  #3 (permalink)  
Old 07-02-2003
charlie
 
Posts: n/a
Default Re: Default type


"Joshua Nixon" <nixonjos@msu.edu> wrote in message
news:bdf682$38v$1@msunews.cl.msu.edu...
> edit httpd.conf like for DirectoryIndex and add index.php to the end.
>
> DirectoryIndex index.html index.html.var index.php
>
> as it says in the httpd.conf comments - this will tell apache which doc
> it should serve when it receives a directory request. if you'd rather it
> serve the .php file than the .html file, delete the index.html file from
> the line, or delete it from the directory.
>
> -josh
>
> This seems ok but when I alter my config file to serve index.mht all I get

is
> Invalid Syntax Error when I try to load the index file with my browser any
>ideas ?
>

Carl


 


Thread Tools
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

vB 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 12:24 PM.


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