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

espurna behind apache reverse proxy #1825

Closed
lblabr opened this issue Jul 14, 2019 · 8 comments
Closed

espurna behind apache reverse proxy #1825

lblabr opened this issue Jul 14, 2019 · 8 comments

Comments

@lblabr
Copy link
Contributor

lblabr commented Jul 14, 2019

i'm running my espurna devices behind apache reverse proxy / haproxy setup.

could somebody give me an advice how the apache reverse proxy configuration has to be ?
or could migrate the example from

#937 (comment)

to an apache config ?

at the moment i have:

ProxyPass / http://10.100.10.62:80/
ProxyPassReverse / http://10.100.10.62:80/

ProxyPreserveHost On

ProxyRequests Off
RewriteEngine on
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
RewriteRule .* ws://10.100.10.1:6868%{REQUEST_URI} [P]
ServerName pump-brunnen.xxx.xx

thanks in advance

@m-kozlowski
Copy link
Contributor

this works for me

ProxyPass "/ws"  "ws://esp-wp-06/ws"
ProxyPass / http://esp-wp-06/

You might also have to set webDomain variable.

@lblabr
Copy link
Contributor Author

lblabr commented Jul 16, 2019

i had some problems with 1.13.5

#1614

can this be fixed with some setting in apache configuration ?

@m-kozlowski
Copy link
Contributor

Wait... You want to workaround lwip MTU related bug by putting reverse proxy between espurna and the client?
1: If it's really that bug, I doubt it would help
2: wouldn't it be easier? #1610 (comment)

@lblabr
Copy link
Contributor Author

lblabr commented Jul 20, 2019

just went back to my old 1.13.1 and it worked. i didn't tested with ab build like #1610.
i'm working more or less with arduino ide and only platform io ist referenced....
at the moment i didn't spent time to figure how i have to setup my framework just went back to an release download, it worked in my case...

sry for that

@lblabr
Copy link
Contributor Author

lblabr commented Jul 20, 2019

my general setup is apache reverse proxy <- openvpn -> haproxy -> servers/clients/IoT

so it could somehow possibly to have quick workoround in that setup, not to set up an reverse proxy to fix the mtu issue

@mcspr
Copy link
Collaborator

mcspr commented Jul 20, 2019

i'm working more or less with arduino ide and only platform io ist referenced....

#1610 (comment) paths are for PIO, but you can do the same with IDE installation. You just need to find where {ARDUINO_DATA_DIRECTORY}/packages/esp8266/hardware/esp8266/{CORE_VERSION}/ is located.
Data dir is either ~/.arduino15, %LOCALAPPDATA%\Arduino15, ~/Documents/ArduinoData (?) or ~/Library/Arduino15/

Cores 2.5.0 >= do use lwip2 by default already (still a selectable option), but you will see a pretty significant firmware size increase

@mcspr
Copy link
Collaborator

mcspr commented Aug 9, 2019

BTW, since the problem with packet size, check out the #1843
Instead of one large payload, which breaks even with most basic config (~1.8KB > 1460MSS), this reverts to pre 1.13.5 behaviour and sends several small packets instead. It still may break on some specific modules if they reach the 1400 byte limit, but should work for in the most common cases.

I would say it is in draft status, but it works for me on a temperature sensor + energy monitor board config without any problems so far.

@stale
Copy link

stale bot commented Oct 8, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 8, 2019
@mcspr mcspr closed this as completed Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants