[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Apache VirtualHost



Hej,

Jeg sidder og roder med Apache 2.0, og har lidt problemer med VirtualHost.

En server hoster to domæner - domain1, domain2 - og jeg har derfor oprettet to VirtualHost sektioner inkl. en sektion for 'default' således:


DocumentRoot "/var/www/html"


# default
<Directory "/var/www/html">
    Options -Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

# domain1
<Directory /var/www/html/domain1>
    Options -Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

# domain2
<Directory /var/www/html/domain2>
    Options -Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>


NameVirtualHost *:80


# default
<VirtualHost *:80>
    DocumentRoot /var/www/html
</VirtualHost>

# domain1
<VirtualHost *:80>
    DocumentRoot /var/www/html/domain1
    ServerName www.domain1.dk
</VirtualHost>

# domain 2
<VirtualHost *:80>
    DocumentRoot /var/www/html/domain2
    ServerName www.domain2.dk
</VirtualHost>


Ovenstående betyder, at taster man serverens IP-adresse ind i browseren, så havner man i 'default'-sektionen, og får en tom side. Taster man www.domain1.dk, så får man indholdet af www.domain1.dk. Fint nok!
Problemet er bare, at jeg ikke er interesseret i at man kan taste f.eks. IP-adresse/domain1 og så få indholdet af domain1. domain1 og domain2 er underkataloger af 'DocumentRoot', og hvis jeg i 'default'-sektionen nægter adgang til underkataloger, så kan jeg ikke se domain1 selvom jeg skriver www.domain1.dk.


Hvordan kan jeg i 'default'-sektionen forhindre adgang til IP-adresse/domain1 - uden at det går ud over www.domain1.dk?

På forhånd tak!

Mvh.
Ole


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:26 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *