=====Update 1/18/2020=====
I finally figured out why my web apps weren't working with server pilot. It has to do with the "b4j_ws.js" file. I did a slight modification documented below:
Change This:
To This:
This allows me to use ServerPilot as my control panel (as they deal with updates, security updates, AutoSSL, etc) with B4J apps.
I finally figured out why my web apps weren't working with server pilot. It has to do with the "b4j_ws.js" file. I did a slight modification documented below:
Change This:
JavaScript:
fullpath = ((l.protocol === "https:") ? "wss://" : "ws://") + l.hostname + ":" + l.port + absolutePath;
To This:
JavaScript:
fullpath = "ws://" + absolutePath;
This allows me to use ServerPilot as my control panel (as they deal with updates, security updates, AutoSSL, etc) with B4J apps.
=====Update 1/15/2020=====
I have decided to spin up a new DigitalOcean droplet (server) entirely free of ServerPilot and am now running into problems getting my app to function correctly. I can access my app via my droplet's IP address however it does not function correctly. When I go to the subdomain it fails to load completely.
By not functioning correctly I mean the following:
Any ideas as to why I'm having this problem with B4J apps?
=====ORIGINAL POST=====
I use DigitalOcean + ServerPilot as my host and am trying to get my web app to work with my ServerPilot "app". It successfully runs and you're able to access it however, I cannot get it to function. (It does function on my local computer and when I access the live app via my server's IP address.)
This is the htaccess I'm using to proxy traffic to the web app:
I have decided to spin up a new DigitalOcean droplet (server) entirely free of ServerPilot and am now running into problems getting my app to function correctly. I can access my app via my droplet's IP address however it does not function correctly. When I go to the subdomain it fails to load completely.
By not functioning correctly I mean the following:
- By default there should be a "0" in the Your Input Measurement" text field. (There isn't)
- Clicking the "Convert!" button should actually convert your input measurement. (It doesn't)
<VirtualHost *:80>
RewriteEngine On
RewriteRule (.*) https://gmu.leftwinggamers.com$1 [R=301,L]
</VirtualHost>
<VirtualHost *:443>
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/gmu.leftwinggamers.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/gmu.leftwinggamers.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/gmu.leftwinggamers.com/chain.pem
ServerName gmu.leftwinggamers.com
ServerAlias www.gmu.leftwinggamers.com
ProxyPreserveHost On
RewriteEngine On
ProxyPass / http://127.0.0.1:25115/
</VirtualHost>
Any ideas as to why I'm having this problem with B4J apps?
=====ORIGINAL POST=====
I use DigitalOcean + ServerPilot as my host and am trying to get my web app to work with my ServerPilot "app". It successfully runs and you're able to access it however, I cannot get it to function. (It does function on my local computer and when I access the live app via my server's IP address.)
This is the htaccess I'm using to proxy traffic to the web app:
HTACCESS:
RewriteEngine On[/SPOILER]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule ^(.*) ws://localhost:25115/$1 [P]
RewriteRule ^(.*) http://localhost:25115/$1 [P]
Attachments
Last edited: