Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: [OPGELOST] </Directory> module in apache2.conf ontbreekt ???  (gelezen 987 keer)

Offline Nonito

  • Lid
[OPGELOST] </Directory> module in apache2.conf ontbreekt ???
« Gepost op: 2011/04/04, 10:29:42 »
Ik heb Apache2.2 geïnstalleeerd met:
sudo apt-get install apache2(http://www.howtoforge.com/ubuntu_lamp_for_newbies)

Als ik na installatie in de browser http://localhost/ ingeef, dan krijg ik inderdaad "It works!".
Wat ik wil, is een “Directory List” van de server (/var/www). Hiervoor heb ik een index.php script. Dit voldoet als ik ingeef: http://localhost/index.php Dit moet echter uitgevoerd worden, zodra ik http://localhost/ ingeef.

Onder Windows heb ik de mogelijkheid dit aan te geven in httpd.conf:
</Directory>
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.php index.php3 index.html index.htm
</IfModule>

Dit “Directory” gedeelte vind ik niet terug in “apache2.conf”. Moet dit gedeelte toegevoegd worden of via een andere file benaderen?
« Laatst bewerkt op: 2011/04/05, 10:03:15 door Nonito »

Offline Nonito

  • Lid
Re: </Directory> module in apache2.conf ontbreekt ???
« Reactie #1 Gepost op: 2011/04/04, 14:01:43 »
Het volgende gevonden:

HTTPD - Apache2 Web Server (https://help.ubuntu.com/10.10/serverguide/C/httpd.html)

** The default value, found in /etc/apache2/mods-available/dir.conf is "index.html index.cgi index.pl index.php index.xhtml index.htm". Thus, if Apache2 finds a file in a requested directory matching any of these names, the first will be displayed. **

Ik heb de module gewijzigd en ziet er nu als volgt uit:
<IfModule mod_dir.c>
          DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
</IfModule>

Het probleem blijft echter. Als ik http://localhost/ ingeef, dan krijg ik weer "It works!". Opnieuw index.html !

Waar gaat het fout ???

Offline Nonito

  • Lid
Re: </Directory> module in apache2.conf ontbreekt ???
« Reactie #2 Gepost op: 2011/04/04, 14:11:32 »
Na een "koude" restart gaat het nu wel goed. OPgelost

Offline Rachid

  • Lid
    • rachidbm
    • Mijn blog
Re: </Directory> module in apache2.conf ontbreekt ???
« Reactie #3 Gepost op: 2011/04/04, 14:14:32 »
Bekijk ook eens het bestand /etc/apache2/sites-available/default ;)
Ben je ook blij dat Ubuntu zo toegankelijk en gratis is, en wil je graag net als ik iets terugdoen, kijk dan eens rond bij mwanzo, dé poort naar het bijdragen aan Ubuntu en haar gemeenschap!

Offline Nonito

  • Lid
Re: </Directory> module in apache2.conf ontbreekt ???
« Reactie #4 Gepost op: 2011/04/04, 14:54:55 »
In dit bestand vind ik geen regel in welke volgorde een index file getoond wordt (afh. van de extensie)