Has anyone tried to change the server_port default vale of 80 to something else, and have it work?
I have the following and if i leave config.server_port=80 it works just fine, however if i change config.server_port=8080 it wont work.
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
// Lets change this from port 80(default) to 8080
config.server_port = 8080;
http_server, server_port overide settings
Re: http_server, server_port overide settings
No one has no idea why changing server ports does not work?
-
- Posts: 19
- Joined: Fri Aug 31, 2018 5:37 am
Re: http_server, server_port overide settings
Sorry about the delayed reply.
The port configuration works and can be tested using examples/protocols/http_server/advanced_tests. Here's how the configuration is set:
The server configuration structure needs to be passed to httpd_start() for this to work (as shown above). Could you please show us the part of your code where this configuration is being set?
The port configuration works and can be tested using examples/protocols/http_server/advanced_tests. Here's how the configuration is set:
Code: Select all
httpd_handle_t hd;
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
config.server_port = 1234;
ESP_ERROR_CHECK(httpd_start(&hd, &config) );
Who is online
Users browsing this forum: Google [Bot] and 315 guests