Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 24 Current »

hosts.conf
<VirtualHost *:80>
    ServerName example.termweb.eu
    DocumentRoot "/var/www/termweb4"
    RewriteEngine On

    <Directory /var/www/termweb4/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json
        Order allow,deny
        allow from all
 
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^.+$ index.html [L]
    </Directory>

    ProxyPreserveHost   on
    ProxyPass           /api http://localhost:8080/api
    ProxyPassReverse    /api http://localhost:8080/api
    ProxyPass           /js http://localhost:8080/js
    ProxyPassReverse    /js http://localhost:8080/js
    ProxyPass           /help http://localhost:8080/help
    ProxyPassReverse    /help http://localhost:8080/help
    ProxyPass           /custom http://localhost:8080/custom
    ProxyPassReverse    /custom http://localhost:8080/custom
    ProxyPass           /layout http://localhost:8080/layout
    ProxyPassReverse    /layout http://localhost:8080/layout
    ProxyPass           /tw4 http://localhost:8080/tw4
    ProxyPassReverse    /tw4 http://localhost:8080/tw4
    ProxyPass           /app http://localhost:8080/app
    ProxyPassReverse    /app http://localhost:8080/app
    ProxyPass           /services http://localhost:8080/services
    ProxyPassReverse    /services http://localhost:8080/services
    ProxyPassReverse    /login http://localhost:8080/login
    ProxyPass           /login-openid http://localhost:8080/login-openid
    ProxyPassReverse    /login-openid http://localhost:8080/login-openid
    ProxyPass           /login-oidc http://localhost:8080/login-oidc
    ProxyPassReverse    /login-oidc http://localhost:8080/login-oidc
    ProxyPass           /login-saml http://localhost:8080/login-saml
    ProxyPassReverse    /login-saml http://localhost:8080/login-saml
    ProxyTimeout 1200
    AddOutputFilterByType DEFLATE application/json


    ErrorLog logs/example.termweb.eu-error_log
    CustomLog logs/example.termweb.eu-access_log common
</VirtualHost>


Enabling HTTP/2 for Apache httpd

Enabling HTTP/2 for TermWeb speeds up initial page render about 3x times.

Prior to enable HTTP/2 you must have at least Apache httpd 2.4.17

To enable HTTP/2 protocol for host use next config: Protocols h2 h2c http/1.1 for your virtual host config, like this:

<VirtualHost *:80>
    ServerName example.termweb.eu
    Protocols h2 h2c http/1.1   
</VirtualHost>


If after restarting httpd (apachectl restart) HTTP/2 is not available then check next things:

  1. That you applied to both http and https connections new protocol

  2. That your httpd config has enabled MPM event in /etc/httpd/conf.modules.d/00-mpm.conf you need to uncomment there next line:

    # event MPM: A variant of the worker MPM with the goal of consuming
    # threads only for connections with active processing
    # See: http://httpd.apache.org/docs/2.4/mod/event.html
    #
    LoadModule mpm_event_module modules/mod_mpm_event.so

    Plus comment old one:

    #LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

    And then restart httpd again.


  • No labels