If I specify port 80 along with a proxy (localhost), the local URL that is spit out is localhost:81, which clearly does not resolve to the right site. Same thing happens with port 8080.
When not using BrowserSync, does your site contain links in the source code such as localhost:80 ?
Nope -- when using port 80, I can just use 'localhost' without the port.
Can you show me your config, I think you're mixing up the port the BrowserSync needs to run & the port that your webserver is listening to
"specifying port 80 gives me port 81" - that's because your server is running at port 80 - BrowserSync needs an open port.
if you can normally access your website through http://localhost then the BrowerSync command should just be
browser-sync start --proxy localhost
Sorry for necro'ing, but since this is the top Google result: If you don't know why it's binding to 81, Skype may be the cause. Go to Extra > Settings > Advanced > Connection and disable 'Use port 80 and 443'.
same problem even skype is not running
Hi,
I tried the solutions mentioned above but none of them worked for me. Skype is ain't using the port 80 and nothing else uses port 80 aside from xampp.
So, I was wondering why browser-sync redirects to port 81 even if I assigned port: 80 on its init. I had it working before but after formatting my pc it doesn't work anymore.
can somebody suggest a solution?
I have simler probrem. and solved.
probrem the always my local mac on brwoser-sync open the 444port useing service.
Of course, the 443 port has already been released. I checked with netstat.
The cause was security software (ESET).
443 was listed in the setting to http protocol check.
Landed here after a google search for: _browsersync port "80" "81"_. BrowserSync ignored the setting port: 8080 and always used port: 8081.
On osX you can check which programs uses port 8080 with:
$ lsof -i :8080 | grep LISTEN
This showed me that node was already using port 8080, so Browsersync switched to the next free port which was 8081. Silly me had a second browsersync in another iTerm Tab running.
Most helpful comment
Sorry for necro'ing, but since this is the top Google result: If you don't know why it's binding to 81, Skype may be the cause. Go to Extra > Settings > Advanced > Connection and disable 'Use port 80 and 443'.