Forum Moderators: phranque

Message Too Old, No Replies

httpd.config problem

# httpd.config

         

adminlinux

12:04 pm on Aug 3, 2006 (gmt 0)

10+ Year Member



Dear friends,

I am facing the problem.
i am generating .html file dynamically. problem is that when i am access the file www.domain.com it not showing, but when i am accessing with www.domain.com/index.html then i will work. Once the index.html is generated then www.domain.com will also work. But again when i remove the index.html is not showing.

Please help me.

Prabhat Kumar
System Administrator.

coopster

1:02 pm on Aug 3, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, adminlinux.

Have a read through the Apache mod_dir [httpd.apache.org] module page. It is a short read. Also, pay specific attention to the DirectoryIndex [httpd.apache.org] configuration directive. I think you'll find your answer.

adminlinux

5:59 am on Aug 4, 2006 (gmt 0)

10+ Year Member



Thanks, coopster
i have already gone with this [httpd.apache.org...]
this. but still i am facing the problem.
if there is any alternative please suggest me.
Any how thanks.

jdMorgan

1:36 pm on Aug 4, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Please post the DirectoryIndex code that you added to your server.

Jim

adminlinux

10:29 am on Aug 5, 2006 (gmt 0)

10+ Year Member




This is setting of my DirectoryIndex
/*

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents. The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex index.html index.html.var

#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>

*/

hope so this is correct

jdMorgan

2:44 pm on Aug 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What configuration code (in httpd.conf, conf.d, or .htaccess) do you use to 'map' requests for http://www.example.com/ to the script which produces the HTML index page?

It is likely that this code currently requires an extension of ".html" on the requested URL, and does not recognize a request for "/".

For example, something like


RewriteRule \.html$ /page_generation_script.php [L]

would fail if just "/" were requested, and would need to be changed to something like:

RewriteRule (\.html$¦^$) /page_generation_script.php [L]

in order to recognize requests for "/" as well.

Jim

g1smd

5:42 pm on Aug 6, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



On my server, the configuration file is called http.conf not http.config as per the thread title.