Can't connect to 127.0.0.1 on High Sierra - macos

I have set up localhost on High Sierra and have all of my web projects in the Sites directory. Everything works fine in that I can access my site using:
http://localhost/~foo/my-site
No problems here. However, I now require Cassandra for one of my projects and I am trying to connect to it on the default ports using:
127.0.0.1:9042
It doesn't work. If I go to 127.0.0.1 I get:
Forbidden
You don't have permission to access / on this server.
I can ping 127.0.0.1 though. Any ideas on how I can get localhost to work while still using Sites?

Related

Mac OS local proxy, connect ECONNREFUSED ::1:3000

I have a create-react-app app running on localhost:3000 and a proxy server running on localhost:4000 that redirects some of my request to port 3000.
Requesting localhost:3000/ correctly returns index.html file,
Requesting localhost:4000/ returns connect ECONNREFUSED ::1:3000 with 502 code.
The exact same setup works properly on Ubuntu (returns index.html from localhost:4000) and Windows so I am sure proxy works fine.
Proxy is built using https://www.npmjs.com/package/http-proxy but i was unable to find any solution to this in documentation.
My question is: Does mac require changing some extra settings to allow this kind of traffic?
One solution is to edit /etc/hosts and remove ::1 localhost mapping or change it to ::1 ip6-localhost (default setting on ubuntu)

Why can't Sequel Pro connect to my local XAMPP server on Catalina?

I'm trying to set up my first XAMPP server. Most recent version of XAMPP, Catalina 10.15.3. XAMPP seems to run ok, I have Apache and mySQL on. Doesn't seem to work at localhost default, but I selected the option to run at localhost:8080 and when I visit that url I see the sample site.
BUT when I try to connect with Sequel Pro using host: 127.0.0.1, username root, port 8080 it thinks for a minute (vs. instant failure with no port specified) then times out. Have restarted my computer, but no luck. Any clues?

Connection refused for 127.0.0.1 on OSX Yosemite

I'm on a really strange situation.
I'm using MAMP and I can't access to my working directory from the 127.0.0.1.
When I'm using localhost instead of 127.0.0.1 it works because the localhost is redirected to the ::1 ipv6 address.
So, I can access to my local server only via ipv6.
I've tried to start a little server with Python and it doesn't work ( it works fine on my personal laptop using OSX El Captain ).
When I try with an other port than 80 it works but I need to use this port ..
It's not a conflict, when I'm running the Python server he is the only one to listen the port 80
Do you have an idea about this trouble ?
Why I can use the ipv6 local address only ?

Safari can’t connect to the server local host

Whenever I start Tomcat, and open http://localhost:8080 I get the following error.
Safari can’t open the page “localhost:8080” because Safari can’t connect to the server “localhost”.
It used to work before today. All I did earlier today was block some websites using the host files, but I restored them back again, and now it looks like this.
#
##
# Host Database
#
#
# localhost is used to configure the lookback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
If I start and stop the server using Eclipse, it works. But localhost can’t connect to server using Safari or Google Chrome either..
I know there are a lot of similar questions, but none of them seemed to help.
Thanks a lot in advance!

Slow local windows django dev environment

My local django dev environment (apache 2.2, Python 2.6, Django 1.2a, mod_wsgi, sqlite, win7 64bit) is really slow. It usually takes 15sec-30sec to load a page.
Any ideas what might be slowing it down? Same application on the production server runs just fine.
Task manager shows:
Task Manager http://img268.imageshack.us/img268/4396/20100201210438.gif
What host name are you using to access your site? Are you using 'localhost'? If so, try using '127.0.0.1' instead and see if it runs quicker.
Seen a few times where people would experience delays because of fact that IPV6 is enabled by default on Windows 7. This was causing issues when accessing via localhost. The solution was to edit:
C:\Windows\system32\drivers\etc\hosts
and comment out the line:
::1 localhost
Ie., make it so it reads:
# ::1 localhost
If there is a line:
# 127.0.0.1 localhost
uncomment it so it reads:
127.0.0.1 localhost
Anyway, think that was what the changes needed to be.

Resources