"default document" for specific path

"default document" for specific path

am 10.08.2007 09:39:24 von cs.st.ng

Hi all,
how can i define a default document?
Example: when a user enters www.mydomain.de in his browser, he must get the
document www.mydomain.de/default.html, or www.mydomain.de/default.php

And of course, when he enters www.mydomain.de/users he must get
www.mydomain.de/users/default.php

I am using Suse 10.2 and the default apache 2.something that is the standard
for 10.2.
I am familiar with iis but not with apache, so any hint which options i must
enter by yast / http server setup, or directly in the config files is
welcome.

thanks in advance
greetings from germany, chris

Re: "default document" for specific path

am 10.08.2007 09:49:46 von unknown

Post removed (X-No-Archive: yes)

Re: "default document" for specific path

am 10.08.2007 10:05:52 von cs.st.ng

Hi Davide,
yes, i already tried directoryindex. But ... i have two virtual hosts,
www98.mydonain.de and www99.mydomain.de. And when i enter the two adresses
in my browser, i always get the default.html of the first virt server.
Funny.

Any more ideas?

Thank you
chris

> See the documentation of Apache on www.apache.org
> hint: directoryindex

Re: "default document" for specific path

am 10.08.2007 10:11:13 von unknown

Post removed (X-No-Archive: yes)

Re: "default document" for specific path

am 10.08.2007 10:37:34 von cs.st.ng

Hi Davide,
so here is the yast2_vhosts.conf:



DocumentRoot /srv/www/vhosts/www99/
ServerName www99
ServerAdmin administrator@www99.os2.local

AllowOverride None
Order allow,deny
Allow from all
DirectoryIndex default.html



DocumentRoot /srv/www/vhosts/www98/
ServerName www98
ServerAdmin administrator@www98.os2.local

AllowOverride None
Order allow,deny
Allow from all
DirectoryIndex default.html






www98.os2.local and www99.os2.local are defined in my dns.

greetings from germany

chris

Re: "default document" for specific path

am 10.08.2007 11:03:31 von cs.st.ng

some more information ... i just tried some more things ... and i have seen
that after a restart if apache it shows always the default.html of the first
server that is called.
Maybee some problem with the host header value?

greetings
chris

Re: "default document" for specific path

am 10.08.2007 11:12:07 von unknown

Post removed (X-No-Archive: yes)

Re: "default document" for specific path

am 10.08.2007 12:14:23 von cs.st.ng

Hi Davide,
now i have changed to ...


DocumentRoot /srv/www/vhosts/www98/
ServerName www98.os2.local
ServerAdmin administrator@www98.os2.local

AllowOverride None
Order allow,deny
Allow from all
DirectoryIndex default.html



DocumentRoot /srv/www/vhosts/www99/
ServerName www99.os2.local
ServerAdmin administrator@www99.os2.local

AllowOverride None
Order allow,deny
Allow from all
DirectoryIndex default.html




Bingo! Now it works correctly. Another reason why the apache had this
strange behavior, is that the grafical interface switches from
"Anfrage-Server durch HTTP-Header bestimmen" to "anfrage-Server durch
IP-Adresse bestimmen" (sorry i only have the german text) every time i start
yast again.



Thank you for your help!



greetings from germany

chris

Re: "default document" for specific path

am 10.08.2007 12:24:07 von unknown

Post removed (X-No-Archive: yes)