Wie einrichten eines proxy-Pfad für alle Pfade außer einige mit apache2?

Ich habe mehrere webapps läuft auf meinem webserver:

  • SVN Repository Browser, zugänglich über https://beta.mydomain.tld/svn/repos
  • Trac-Instanz, barrierearm über https://beta.mydomain.tld/trac
  • Meine eigene java-web-Anwendung zugänglich über http://beta.mydomain.tld/ mit einem Proxy für den lokalen Apache-Tomcat auf port 8080

Bitte beachten Sie, dass die ersten zwei sind verfügbar über SSL, die Dritte ist (noch) nicht. Jetzt muss ich für meine web-app verfügbar über https, aber ich möchte Trac und SVN-Browser immer noch zugänglich sein, Ihre aktuelle Lage.

I. e. Ich bin versucht zu konfigurieren apache2 als proxy alle Anfragen nicht ab svn oder trac zu Tomcat.

Für die bestehenden SSL-web-apps, gibt es die folgende Konfiguration

    <Location /svn/repos>
        DAV svn
        SVNParentPath /home/myuser/svn
        SVNListParentPath on
        AuthType Basic
        AuthName "Subversion repository"
        AuthUserFile /home/myuser/.htpasswd
        Require valid-user
    </Location>

    <Location /trac>
        SetHandler mod_python
        PythonHandler trac.web.modpython_frontend
        PythonOption TracEnvParentDir /home/myuser/trac
        PythonOption TracUriRoot /trac
        AuthType Basic
        AuthName "Trac"
        AuthUserFile /home/myuser/.htpasswd
        Require valid-user
    </Location>

Ich versuchte, fügen Sie den folgenden Speicherort, aber es hat nicht geholfen... alles

    <Location />
        ProxyPass           http://localhost:8080
        ProxyPassReverse    http://localhost:8080/
    </Location>

Für weitere Informationen, hier ist die komplette apache2-Konfiguration bezüglich der SSL-Teil (ohne von meinen gescheiterten versuchen, in - ich glaube es ist Standard-trac-Konfiguration):

<VirtualHost *:443>
    ServerAdmin webmaster@localhost
    ServerName beta.mydomain.tld:443

    DocumentRoot /var/www/
    <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    </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/ssl_access.log combined

    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>

    SSLEngine on

    SSLCertificateFile    /etc/ssl/certs/ssl.crt
    SSLCertificateKeyFile /etc/ssl/private/ssl.key

    BrowserMatch ".*MSIE.*" \
            nokeepalive ssl-unclean-shutdown \
            downgrade-1.0 force-response-1.0

    <Location /svn/repos>
        DAV svn
        SVNParentPath /home/myuser/svn
        SVNListParentPath on
        AuthType Basic
        AuthName "Subversion repository"
        AuthUserFile /home/myuser/.htpasswd
        Require valid-user
    </Location>

    <Location /trac>
        SetHandler mod_python
        PythonHandler trac.web.modpython_frontend
        PythonOption TracEnvParentDir /home/myuser/trac
        PythonOption TracUriRoot /trac
        AuthType Basic
        AuthName "Trac"
        AuthUserFile /home/myuser/.htpasswd
        Require valid-user
    </Location>

InformationsquelleAutor peterp | 2012-04-26
Schreibe einen Kommentar