0

I am using LiveServer plugin of VSCode to serve my pages. I need to serve it on port number 443. Below is my settings.json file.

{
  "liveServer.settings.port": 443,
  "liveServer.settings.root": "/",
  "liveServer.settings.CustomBrowser": "chrome",
  "liveServer.settings.https": {
    "enable": true,
    "cert": "xxx/https/localhost.pem",
    "key": "xxx/localhost.key",
    "passphrase": "XXXXXX"
  } }

As soon as i run the server the port number automatically changes from 443 to 444. Can anyone please help? Thanks in advance.

mulla.azzi
  • 2,676
  • 4
  • 18
  • 25

2 Answers2

1

If you use Windows, open Powershell and enter the following command: Test-NetConnection -computername google.de -port 443

This will test if the port is free or not

MikeB
  • 11
  • 2
0

If you are running VSCode with WSL on windows, linux has a bind permission limitation for ports less than 1000, found https://www.geeksforgeeks.org/bind-port-number-less-1024-non-root-access/ and https://github.com/microsoft/vscode/issues/138064, haven't figured out a solution yet. Anyone who have a clue, please kindly share.