• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Changing port number

Q&A Forum › Category: ESP8266 › Changing port number
0 Vote Up Vote Down
Arthur Spurr asked 6 years ago

The default webserver port is 80 so what code change is necessary to use a different port.

Changing the port number in the server code segment below makes the IP address unavailable

// Set web server port number to 80
WiFiServer server(80);

Can anyone advise how the port number can be changed.

Thanks

Since posting the above I have looked further on Github and it seems this is not a simple matter, but would appreciate knowing if anyone has attempted this.

3 Answers
0 Vote Up Vote Down
DK answered 6 years ago

Hi
enter
WiFiServer server(89);    //whatever other port you wish

Also add port to IP address in URL in Internet Explorer
http://192.168.1.26:89
you can use port 80 and run wampserver on port 80 aswell
 

0 Vote Up Vote Down
Arthur Spurr answered 6 years ago

Many thanks, really appreciate the response.

0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

Just do exactly what Derek suggested and it should work.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.