Anyone having issues with /etc/hosts on MacOS ?

I'm trying to set up an entry in my /etc/hosts to map 127.0.0.1 to a website I'm working on. It's not working. The weird part is that when I ping it ping web.site it is correctly routing to 127.0.0.1 but it wouldn't work in the browser. I just bought my laptop a couple of days ago so this definitely isn't a browser cache issue or something like that (AFAIK at least) Any thoughts ?
6 Replies
dan
dan15mo ago
include the port on the browser side. e.g. if this is a next app youd do web.site:3000 (3000 being the default port for nextjs)
_zirve
_zirveOP15mo ago
I need to do it without specifying the port since another app will connect to it I set up a reverse proxy using nginx but that comes with a new set of problems I suppose Thanks for the response!
dan
dan15mo ago
you can have the other app connect using the port
_zirve
_zirveOP15mo ago
Not my code The thing is
dan
dan15mo ago
then nginx rev proxy would be the best bet / some other rev proxy
_zirve
_zirveOP15mo ago
This used to work fine on my Linux machine before switching So yeah reverse proxy is prolly the way to go
Want results from more Discord servers?
Add your server