virtualhost in subdirectory statt subdomain

Alles, was den Apache betrifft, kann hier besprochen werden.

virtualhost in subdirectory statt subdomain

Postby smooph » 18. February 2010 00:26

Hi ich hab meinen eigenen Kolab Server am laufen ... dessen Apache läuft auf port 81.

Dank des wikis auf kolab.org hab ich es hinbekommen meinen "echten" apache so aufzusetzen das er mit dem proxy modul auf port 81 durchreicht.

Ich möchte meinen server jedoch nicht unter kolab.domain2.org laufen lassen da mein ssl zertifikat nur für domain2.org gilt. Logische Schlussfolgerung für mich war also der kolab server muss nach domain2.org/kolab Ich habe unten meine vhost datei angefügt in der hoffnung dass mir jemand sagen kann wie ich mein vorhaben in die tat umsetzten kann.

Code: Select all
<VirtualHost *:80>
    ServerAdmin     webmaster@domain2.org
    ServerName      kolab.domain2.org
   
    # Logging configuration
    CustomLog       /var/log/apache2/kolab.domain2.org_access.log combined
    ErrorLog        /var/log/apache2/kolab.domain2.org_error.log
    LogLevel        warn
   
    # Always redirect HTTP to HTTPS
    RewriteEngine   On
    RewriteCond     %{SERVER_PORT} !^443$
    RewriteRule     ^(.*)$ https://kolab.domain2.org$1 [L,R]
   
    ServerSignature On
</VirtualHost>

<VirtualHost *:443>
    ServerAdmin           webmaster@domain2.org
    ServerName            kolab.domain2.org
     
    # Logging configuration
    CustomLog             /var/log/apache2/kolab.domain2.org_access.ssl.log combined
    ErrorLog              /var/log/apache2/kolab.domain2.org_error.ssl.log
    LogLevel              warn
   
    # Content filter declaration
    # Note: If you want to use deflate module, see dedicated section (5. Annex)
    SetOutputFilter       proxy-html
   
    # Proxy-HTTP configuration
    ProxyPass             /                               http://127.0.0.1:81/
    ProxyPassReverse      /                               http://127.0.0.1:81/
    RequestHeader         unset                           Accept-Encoding
   
    # Proxy-HTML configuration
    ProxyHTMLExtended     On
    ProxyHTMLDoctype      XHTML Legacy
    ProxyHTMLMeta         On
    ProxyHTMLURLMap       http://127.0.0.1:81/           /
    ProxyHTMLURLMap       http%3A%2F%2F127.0.0.1%3A81%2F  https%3A%2F%2Fkolab.domain2.org%2F
   
    # Proxy permissions
    ProxyRequests         Off
   
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
   
    # Rewrite configuration
    # By default, if no location is specified, redirect to Horde
    RewriteEngine         On
    RewriteCond           %{REQUEST_URI}                  ^/$
    RewriteRule           ^(.*)$                          https://%{SERVER_NAME}/horde/ [L,R]
   
    # SSL configuration
    SSLEngine             On
    SSLCipherSuite        ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    SSLCertificateFile    /kolab/etc/kolab/cert.pem
    SSLCertificateKeyFile /kolab/etc/kolab/key.pem
   
    ServerSignature       On
</VirtualHost>


Danke
smooph
 
Posts: 2
Joined: 18. February 2010 00:17

Return to Apache

Who is online

Users browsing this forum: No registered users and 36 guests