HOME DOCUMENTATION DOWNLOADS BLOG

Using Apache as Reverse Proxy for HTML5 Server

This article describes configuration of Apache server to be used as a reverse proxy for HTML5 server.

Modify HTML5’s appsettings.json

Set BehindProxy as true.

Configure Apache Server

Example:

<IfModule mod_ssl.c>
  <VirtualHost *:443>
    RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    ProxyPreserveHost On	
    ProxyPass / http://127.0.0.1:8080/ retry=0
    ProxyPassReverse / http://127.0.0.1:8080/
    ErrorLog ${APACHE_LOG_DIR}/sslerror.log
    CustomLog ${APACHE_LOG_DIR}/sslaccess.log combined
    SSLEngine on
    SSLProtocol all -SSLv2
    SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:!RC4+RSA:+HIGH:+MEDIUM:!LOW:!RC4
    SSLCertificateFile	/etc/ssl/certs/ssl-cert-snakeoil.pem
    SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
  </VirtualHost>
</IfModule>