Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thingspeak behind reverse proxy #47

Open
franzhartwig opened this issue Jan 1, 2017 · 2 comments
Open

Thingspeak behind reverse proxy #47

franzhartwig opened this issue Jan 1, 2017 · 2 comments

Comments

@franzhartwig
Copy link

Thank you for making thingspeak! Accessing my thingspeak server via the internet gives me some problems:

  • I cannot access port 3000 or other "unusual" port.
  • I want to access thingspeak via https.
    Configuring Apache as a reverse proxy would solve the problems. Unfortunately the charts are not shown. It only shows /dev-assets/ajax-loader.gif. Where is the point it breaks?
    Thank you for your advice!
    Happy new year,
    Franz
@fuco809
Copy link

fuco809 commented Mar 24, 2019

i use nginx for that with a config like this example without ssl:

server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm;
server_name YourServer.Name.Com;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Fix the “It appears that your reverse proxy set up is broken" error.
proxy_pass http://localhost:3000;
proxy_read_timeout 90;
proxy_redirect http://localhost:3000 https://YourServer.Name.Com;
}
}

based on:
https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-with-ssl-as-a-reverse-proxy-for-jenkins

@franzhartwig
Copy link
Author

Thank you, fuco809, for your reply. I forgot about this threat, my threat ...

Some day, I got it to work with Apache. This is the virtual host config:

<IfModule mod_ssl.c>
<VirtualHost *:443>
## SSL specific settings stripped ##
# I had to modify some some lines of my default config for other virtual hosts:
Header always unset Content-Security-Policy
Header always set Content-Security-Policy "upgrade-insecure-requests"
# This line unsets X-Content-Type-Options: nosniff in my default config for other virtual hosts, this may be the key line:
Header always unset X-Content-Type-Options
# Maybe this line is not nessecary (any more?):
#Header always unset Strict-Transport-Security
ServerAdmin [email protected]
ServerName thingspeak.example.com
### ReverseProxy ###
	ProxyRequests Off
	ProxyHTMLExtended On
        ProxyPass / http://localhost:3000/ timeout=180 retry=1 acquire=3000 Keepalive=On
        ProxyPassReverse / http://localhost:3000/
        ProxyHTMLURLMap http://localhost:3000/ /
        SetOutputFilter proxy-html
        RequestHeader unset Accept-Encoding
        ProxyPreserveHost On
### Ende ReverseProxy ###
</VirtualHost>
</IfModule>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants