Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Safari Can't establish a secure connection for localhost

I am running my application with localhost in safari, and it says 'cant open localhost:4200' because safari can't establish a secure connection.


Is there any setting to be done for this?


please help , how can I run localhost in safari

MacBook Pro

Posted on Jan 30, 2020 12:24 AM

Reply
6 replies

Jan 30, 2020 5:53 PM in response to pmadhavi14

What type of application is this? The two most likely candidates appear to be Angular and some Virtual Reality applications. Do you have the firewall turned on? These items would make a difference. I'm not clear on what you are doing, making it difficult.


There are a number of mentions in the internet about being unable to open port 4200 because it is already in use. It says that there are ways to change the port used by the ng server.


sudo lsof -i -n -P | grep ":4200" should hopefully list any applications using the port.


Sometimes you can use 127.0.0.1 when localhost doesn't work.


*** *** ****


I was just looking at some more articles, such as https://www.router-switch.com/faq/difference-between-https-port-443-and-8443.html


If you are running https, why are using 4200? I thought 443 and 8443 were the normal ports. If this is a server, what server software are you using.



Jan 31, 2020 12:08 AM in response to Bradley Ross

I am running angular application with 'ng serve' - which runs in 'https://localhost:4200' by default


I have just given 4200 as reference(as you said we can use any port with ng serve --port <any portnumber>) , but my problem is localhost is not working in safari/chrome whatever the port it is .


I found that, the problem I was facing is with 'localhost Certificate trust', - it resolved my problem


Safari Can't establish a secure connection for localhost

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.