WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Linux, UNIX, Open Source (http://www.wcm.at/forum/forumdisplay.php?f=13)
-   -   apache2: vhosts config-Problem (http://www.wcm.at/forum/showthread.php?t=191137)

Nestrus 07.05.2006 15:15

apache2: vhosts config-Problem
 
Hallo,

ich habe unter Debian Apache 2.0.54 laufen. Unter /var/www hab ich mehrere Ordner, zB der für die Homepage und der für phpmyadmin.
Ich will gerne über sites-enabled phpmyadmin schnell zugänglich machen, da ich nur eine Domain habe unter phpmyadmin.domain.at oder www.domain.at/phpmyadmin.

Ich hab das so probiert:
sites-available/default:
Code:

NameVirtualHost *
<VirtualHost *>
        ServerAdmin webmaster@localhost
        ServerName www.domain.at
        ServerAlias domain.at
        DocumentRoot /var/www/homepage
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/homepage>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                Allow from all
                # This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
                # RedirectMatch ^/$ /apache2-default/
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined
        ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

sites-available/phpmyadmin:
Code:

<VirtualHost *>
        ServerAdmin webmaster@localhost
        ServerName phpmyadmin.domain.at
        DocumentRoot /var/www/homepage
        <Directory /var/www/homepage>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                Allow from all
                # This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
                # RedirectMatch ^/$ /apache2-default/
        </Directory>

</VirtualHost>

Kann mir jemand sagen, wie es funktionieren sollte?

Danke schon mal
Nestrus

callas 07.05.2006 20:45

willst du es mit der subdomain machen musst bei document root den pfad zum phymyadmin verzeichnis angeben.

bei der 2. variante einfach beim vhost einen Alias /phpmyadmin auf /pfad_zu/phpmyadmin, so wie der alias auf /doc schon gesetzt ist.

edit: nachdem phpmyadmin ohnehin in deinem document root ist, kann es eh mit www.domain.at/phpmyadmin-verzeichnisname ansprechen.

Nestrus 08.05.2006 14:56

Oh, hier hat sich ein kleiner Fehler eingeschlichen, das sites-available/phpmyadmin schaut natürlich so aus:
Code:

<VirtualHost *>
        ServerAdmin webmaster@localhost
        ServerName www.domain.at/phpmyadmin
        DocumentRoot /var/www/phpmyadmin
        <Directory /var/www/phpmyadmin>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                Allow from all
                # This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
                # RedirectMatch ^/$ /apache2-default/
        </Directory>

</VirtualHost>

Phpmyadmin liegt nicht in /var/www/homepage/phpmyadmin sondern /var/www/phpmyadmin, ich will auf die gleiche weiße auch die Homepage kopieren können, um dort Änderungen zu testen u. ä.

Ein Alias wäre ja zB:

Alias /phpmyadmin/ "/var/www/phpmyadmin"
<Directory "/var/www/phpmyadmin/">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Leider geht das auch nicht...

Nestrus 17.05.2006 14:25

*schieb*

callas 18.05.2006 09:40

hat der webserver user leserechte ?

sinnvollerweise sollte für solche programme eh ein eigener webserver task mit eigenem user laufen.

kannst du phpmyadmin überhaupt aufrufen oder funktioniert nur der vhost/alias nicht?

Nestrus 19.05.2006 16:12

Ja und ja.
Der Ordner gehört dem webserveruser und wenn ich ihn in den www-root der doamin schiebe, kann ich normal darauf zugreifen.

callas 22.05.2006 10:54

hmm, bei mir funktioniert dieser Alias:

Code:

Alias /phpmyadmin "/var/www/phpMyAdmin/"
<Directory "/var/www/phpMyAdmin">
Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

die abschliessenden slashes sind bei dir
teilweise anders.

Nestrus 23.05.2006 23:03

Vielen Dank, jetzt gehts bei mir auch!


Alle Zeitangaben in WEZ +2. Es ist jetzt 03:48 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag