SearchSearch   

"default document" for specific path

 
   Webmaster Forums (Home) -> Apache RSS
Next:  Apache 2059 AcceptMutex on Solaris  
Author Message
Christian_Stüben

External


Since: Aug 10, 2007
Posts: 6



(Msg. 1) Posted: Fri Aug 10, 2007 9:39 am
Post subject: "default document" for specific path
Archived from groups: alt>apache>configuration (more info?)

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
Back to top
Davide Bianchi

External


Since: Oct 23, 2004
Posts: 3383



(Msg. 2) Posted: Fri Aug 10, 2007 9:49 am
Post subject: Re: "default document" for specific path
Imported from groups: per prev. post (more info?)

This message is not archived
Back to top
Christian_Stüben

External


Since: Aug 10, 2007
Posts: 6



(Msg. 3) Posted: Fri Aug 10, 2007 10:05 am
Post subject: Re: "default document" for specific path
Archived from groups: per prev. post (more info?)

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
Back to top
Davide Bianchi

External


Since: Oct 23, 2004
Posts: 3383



(Msg. 4) Posted: Fri Aug 10, 2007 10:11 am
Post subject: Re: "default document" for specific path
Imported from groups: per prev. post (more info?)

This message is not archived
Back to top
Christian_Stüben

External


Since: Aug 10, 2007
Posts: 6



(Msg. 5) Posted: Fri Aug 10, 2007 10:37 am
Post subject: Re: "default document" for specific path
Archived from groups: per prev. post (more info?)

Hi Davide,
so here is the yast2_vhosts.conf:


<VirtualHost www99.os2.local>
DocumentRoot /srv/www/vhosts/www99/
ServerName www99
ServerAdmin administrator DeleteThis @www99.os2.local
<Directory /srv/www/vhosts/www99/>
AllowOverride None
Order allow,deny
Allow from all
DirectoryIndex default.html
</Directory>
</VirtualHost>
<VirtualHost www98.os2.local>
DocumentRoot /srv/www/vhosts/www98/
ServerName www98
ServerAdmin administrator DeleteThis @www98.os2.local
<Directory /srv/www/vhosts/www98/>
AllowOverride None
Order allow,deny
Allow from all
DirectoryIndex default.html
</Directory>
</VirtualHost>




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

greetings from germany

chris
Back to top
Christian_Stüben

External


Since: Aug 10, 2007
Posts: 6



(Msg. 6) Posted: Fri Aug 10, 2007 11:03 am
Post subject: Re: "default document" for specific path
Archived from groups: per prev. post (more info?)

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
Back to top
Davide Bianchi

External


Since: Oct 23, 2004
Posts: 3383



(Msg. 7) Posted: Fri Aug 10, 2007 11:12 am
Post subject: Re: "default document" for specific path
Imported from groups: per prev. post (more info?)

This message is not archived
Back to top
Christian_Stüben

External


Since: Aug 10, 2007
Posts: 6



(Msg. 8) Posted: Fri Aug 10, 2007 12:14 pm
Post subject: Re: "default document" for specific path
Archived from groups: per prev. post (more info?)

Hi Davide,
now i have changed to ...

<VirtualHost www98.os2.local>
DocumentRoot /srv/www/vhosts/www98/
ServerName www98.os2.local
ServerAdmin administrator RemoveThis @www98.os2.local
<Directory /srv/www/vhosts/www98/>
AllowOverride None
Order allow,deny
Allow from all
DirectoryIndex default.html
</Directory>
</VirtualHost>
<VirtualHost www99.os2.local>
DocumentRoot /srv/www/vhosts/www99/
ServerName www99.os2.local
ServerAdmin administrator RemoveThis @www99.os2.local
<Directory /srv/www/vhosts/www99/>
AllowOverride None
Order allow,deny
Allow from all
DirectoryIndex default.html
</Directory>
</VirtualHost>


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
Back to top
Davide Bianchi

External


Since: Oct 23, 2004
Posts: 3383



(Msg. 9) Posted: Fri Aug 10, 2007 12:24 pm
Post subject: Re: "default document" for specific path
Imported from groups: per prev. post (more info?)

This message is not archived
Back to top
Display posts from previous:   
       Webmaster Forums (Home) -> Apache
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum