Skip to content

Instantly share code, notes, and snippets.

@4nh51rk
Forked from vbalexr/apache-thingsboard.conf
Created December 24, 2021 06:50
Show Gist options
  • Select an option

  • Save 4nh51rk/46174e6e66491d609145c18de0929f83 to your computer and use it in GitHub Desktop.

Select an option

Save 4nh51rk/46174e6e66491d609145c18de0929f83 to your computer and use it in GitHub Desktop.

Revisions

  1. @vbalexr vbalexr revised this gist Nov 6, 2019. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions apache-thingsboard.conf
    Original file line number Diff line number Diff line change
    @@ -6,8 +6,10 @@
    ProxyPreserveHost On

    #Redireccion de wss a ws
    ProxyPass /api/ws ws://localhost:8080/api/ws
    ProxyPassReverse /api/ws ws://localhost:8080/api/ws/
    RewriteEngine on
    RewriteCond %{HTTP:Upgrade} websocket [NC]
    RewriteCond %{HTTP:Connection} upgrade [NC]
    RewriteRule .* "ws://localhost:9201%{REQUEST_URI}" [P]

    #Redireccion de https(443) a 8080 mostrar maintenace.html en caso de error
    ProxyPass /maintenance.html !
  2. @vbalexr vbalexr created this gist Jan 22, 2018.
    25 changes: 25 additions & 0 deletions apache-thingsboard.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    <VirtualHost *:443>
    ServerAdmin "EMAIL ADMIN"
    DocumentRoot /var/www/html
    ServerName "SERVERNAME"
    ProxyRequests off
    ProxyPreserveHost On

    #Redireccion de wss a ws
    ProxyPass /api/ws ws://localhost:8080/api/ws
    ProxyPassReverse /api/ws ws://localhost:8080/api/ws/

    #Redireccion de https(443) a 8080 mostrar maintenace.html en caso de error
    ProxyPass /maintenance.html !
    ProxyPass / http://localhost:8080/
    ProxyPassReverse / http://localhost:8080/

    #Archivos de bitacora
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    #Configuracion de SSL
    SSLEngine on
    SSLCertificateFile "CERTFILE"
    SSLCertificateKeyFile "KEYFILE"
    </VirtualHost>