Archiv verlassen und diese Seite im Standarddesign anzeigen : bestimmte Domain in Unterordner leiten
Hallo,
gibt es die Möglichkeit den Apache so zu konfigurieren das er bei einer bestimmten URL Content aus einem bestimmten Unterordner ausliefert ?
Also bei aufruf von subdomain.domainAA.com soll content aus /aa/aa
ausgeliefert werden und bei subdomain.ganzandreurl.com soll er aus /bb/bb Content ausliefern . Kann der Apache dies auswerten und je nach Fall "umleiten" ?
viele Grüße
tkbeat
gibt es die Möglichkeit den Apache so zu konfigurieren das er bei einer bestimmten URL Content aus einem bestimmten Unterordner ausliefert ?
ja - stichwort - virtual host
Danke für den Tip
Das funktioniert zwar , ich habe allerdings für beide Domains bzw für bei Unterordner Ordner eine Authentifizierung aktiviert die schon funktioniert hat .
Diese greift nun nicht mehr , d. h. die Ordner sind frei zugänglich was eher nicht gewünscht ist .
Die conf ist für 2 Ordner welche nicht unterhalb von /var/www/ liegen sondern direkt im Root:
/trac/shop
/svn/shop
Dies wurde aber in der conf berücksichtigt siehe :
<VirtualHost *:80>
ServerAdmin admin@meinefirma.de
Servername svn.domain1.org
DocumentRoot /svn/shop
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
<Location /svn>
DAV svn
SVNParentPath /svn
# AuthzSVNAccessFile /etc/svnaccess
</Location>
<Location /svn/shop>
PythonOption TracEnv "/svn/shop"
PythonOption TracUriRoot "/svn/shop"
AuthType Basic
AuthName "Shop"
AuthBasicProvider ldap
# Order Allow,Deny
Allow from All
AuthLDAPURL ldap://ldapserver
AuthzLDAPAuthoritative on
AuthLDAPBindDN ldapuser
AuthLDAPBindPassword ldappass
Require valid-user
</Location>
</VirtualHost *:80>
<VirtualHost *:80>
ServerAdmin admin@meinefirma.de
ServerName bug.domain2.org
DocumentRoot /trac/shop
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
<Location /trac>
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /trac
PythonOption TracUriRoot /trac
AuthType Basic
AuthName "Trac"
AuthUserFile /etc/svnauth
Require valid-user
</Location>
<Location /trac/skshop>
#LoadModule auth_module modules/mod_auth.so
#LoadModule ldap_module modules/util_ldap.so
#LoadModule auth_ldap_module modules/mod_auth_ldap.so
PythonOption TracEnv "/trac/shop"
PythonOption TracUriRoot "/trac/shop"
AuthType Basic
AuthName "Shop"
AuthBasicProvider ldap
# Order Allow,Deny
Allow from All
AuthLDAPURL ldap://ldapserver
AuthzLDAPAuthoritative on
AuthLDAPBindDN ldapuser
AuthLDAPBindPassword ldappass
# Require ldap-group ou=Users,dc=meinedc
</Location>
</VirtualHost>
Wie währe es den mit einen simplen:
<VirtualHost *:80>
ServerName bla.foo.bar
ServerAlias *.bla.foo.bar
Redirect permanent /bla http://www.bla.foo.bar/
</VirtualHost>
Greeez Oli
danke, aber fehlt dann hier nicht die ldap authentifizierung ?
und ein allowOverride none ist evtl. nicht ganz glücklich, wenn Du Auth haben willst.
Packe bitte die Config auch in [code]-Tags, dann kann man sie wesentlich besser lesen...
done, nur wie lös ich jetzt o. g. Problem am besten ?
gerade gesehen: wenn die VZ nicht unterhalb des DocRoot liegen ist location die falsche Direktive...
kannst du sagen welche ich nehmen sollte ?
Directory ?
Die Apache-Doku hat dazu eine ded. Meinung...
http://httpd.apache.org/docs/2.2/de/mod/core.html
Powered by vBulletin® Version 4.2.5 Copyright ©2024 Adduco Digital e.K. und vBulletin Solutions, Inc. Alle Rechte vorbehalten.