-
-
Save randy3k/8a263cff68031e60e00fb75fce963006 to your computer and use it in GitHub Desktop.
location ~ ^/webcam/(.*) { | |
rewrite ^/webcam/(.*) /octopi/webcam/$1 redirect; | |
} | |
location /octopi/ { | |
if ($scheme != "https") { | |
rewrite ^ https://$host$uri permanent; | |
} | |
rewrite ^/octopi/(.*)$ /$1 break; | |
proxy_pass http://192.168.0.167; | |
proxy_redirect ~^http://192.168.0.167/(.*)$ $scheme://$host/octopi/$1; | |
proxy_set_header Host $http_host; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Scheme $scheme; | |
proxy_set_header X-Script-Name /octopi; | |
proxy_http_version 1.1; | |
client_max_body_size 0; | |
location /octopi/webcam/ { | |
rewrite ^/octopi/webcam/(.*)$ /webcam/$1 break; | |
proxy_pass http://192.168.0.167; | |
proxy_redirect ~^http://192.168.0.167/(.*)$ $scheme://$host/octopi/$1; | |
auth_basic "Authorization required"; | |
auth_basic_user_file /data/access/1; | |
} | |
} |
thanks, I used this to get my reverse proxy working with octopi!
I’m glad that it helps.
Hey,
Seems to be the config I'm searching for a while. But how do you enter it in the NginX Proxy Manager GUI? I don't found a config file or so... Can you explain ?
Regards
You could copy and paste these in the advanced setting.
Oh, yeah.
I've tried (and seems working in Nginx Proxy Man.) but have the same problem with the connexion: WebSocket connection to 'wss://my.domain.tld/sockjs/938/qfpsx55q/websocket' failed
and nothing special in the octoprint.log
. I'm still searching...
Thanks.
@argael did you ever get this working with npm?
If someone is looking for this error - enable CORS in octopi under Settings -> API
Works well. Thanks!
(Need to remove webcam section for me)
thanks, I used this to get my reverse proxy working with octopi!