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

Feature request: Configurable HTTP webserver port #573

Closed
ghtester opened this issue Oct 30, 2017 · 11 comments
Closed

Feature request: Configurable HTTP webserver port #573

ghtester opened this issue Oct 30, 2017 · 11 comments
Labels
Category: Frontend Related to web-interface Type: Feature Request Add a completely new feature (e.g. controller/plugin)
Milestone

Comments

@ghtester
Copy link

I think it would be nice if the default HTTP port could be easily configurable in the webserver settings please. AFAIK, currently it is "hardcoded" in source file ESPEasy.ino :

// WebServer
ESP8266WebServer WebServer(80);

As I would like to get several ESPEasy devices temporarily accessible behind my old router (which can support only 1:1 port forwarding), it's not easily possible when all ESPEasy webservers can listen only on the same port 80.

By the way, thanks a lot to all contributors of this great project. It's a really good work!

@Grovkillen Grovkillen added Category: Core related Related to the (external) core libraries Type: Enhancement Improve something already present labels Oct 30, 2017
@Grovkillen Grovkillen added this to the future milestone Oct 30, 2017
@TD-er
Copy link
Member

TD-er commented Oct 30, 2017

Another option can be to use apache on a Linux host and let Apache do the "port translation" via a proxypass directive.
Then you can define a virtualhost based on either a domainname, or a portnumber and in such a virtualhost you can let Apache do the re-route to another host.

e.g. bla1.mydomain.com and bla2.mydomain.com can all be pointing to the same A-record of your router and all use port 80. Apache will then route to the proper host internally, based on the domainname in your browser's URL.

This can be as simple as a Raspberry pi or any other Linux host.

@LeeNX
Copy link
Contributor

LeeNX commented Oct 30, 2017

I have done the hidden some devices behind a proxy, but there are a few URL that are a few Absolute URLs in the ESPEasy firmware - https://www.letscontrolit.com/forum/viewtopic.php?f=4&t=3628

I can detail how to do this for hostname, subdomains and sub URLs, if anybody is interested.

@TD-er
Copy link
Member

TD-er commented Oct 30, 2017

I was thinking of another advantage of using Apache as a proxy.
You can add .htaccess to ask for credentials first when someone is trying to access.

You simply do not want ESPeasy to be accessible via the internet without some minimal protection.

@LeeNX how can the URLs be absolute (with included hostname)?

@LeeNX
Copy link
Contributor

LeeNX commented Oct 30, 2017

I have secured a domain with an SSL and used OAuth for access, using a single domain, with sub-URL for different devices.

https://espeasy.leenx.lan/ESP-01/ and https://espeasy.leenx.lan/ESP-02/ ... but if you click something like reboot, the URL looks like https://espeasy.leenx.lan/reboot, instead of https://espeasy.leenx.lan/ESP-01/reboot.

Agreed, if you use the honstames as in https://esp-01.espeasy.leenx.lan and https://esp-02.espeasy.leenx.lan, this would not be a problem.

@TD-er
Copy link
Member

TD-er commented Oct 30, 2017

Ah, I get it now.
That some URLs are relative and some are not, sounds like a bug. Perhaps add a new issue about that?
This issue (http port number) is more like a feature request, but already a work-around is possible using Apache, which in my opinion makes administration a lot easier.

@TD-er TD-er added Category: Frontend Related to web-interface Type: Feature Request Add a completely new feature (e.g. controller/plugin) and removed Category: Core related Related to the (external) core libraries Type: Enhancement Improve something already present labels Mar 4, 2018
@TungstenE2
Copy link
Contributor

any news on this? HTTP port setting would be a nice feature.

@stevewrightnz
Copy link

It would also be nice to be able to set the web page username - a bit more secure that just "admin"

@uzi18
Copy link
Contributor

uzi18 commented May 5, 2020

@LeeNX @TungstenE2 @ghtester so if you want to test it maybe we can ask @TD-er to provide test builds :)

@ghtester
Copy link
Author

ghtester commented May 6, 2020

@uzi18 A great job, thanks a lot, just quickly tested a fresh test build made by @TD-er and seems to be working fine. :-) I believe we can close this thread as soon as it's merged.

@uzi18
Copy link
Contributor

uzi18 commented May 6, 2020

I'm glad that you are happy :)

@ghtester
Copy link
Author

Thanks again for a great work, this thread can be closed. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Frontend Related to web-interface Type: Feature Request Add a completely new feature (e.g. controller/plugin)
Projects
None yet
Development

No branches or pull requests

7 participants