How Do We Configure a WordPress (OS X) Stack So That We Can Access an External End-Point in the Same Machine?

Keywords: WordPress - OSX VM - How to - Other

Description:
This is a setup within my local Mac Machine.

  1. A working Bitnami WordPress Stack.
  2. A working API written in Python.

The plan: I want to access the Python API from Wordpress.

My WordPress plugin is working when interfacing with a test end-point on the internet.
However, I’m getting a “Connection refused” error when attempting to access the Python end-point within my machine.

Both Python end-point (0.0.0.0:8080) and WordPress stack (192.168.64.3) are in my local machine for development purposes.

What configuration steps should be done to allow the WordPress stack to access the local end-point?

Can anyone share some ideas?

Hi @Egdon,

Did you try using 127.0.0.1:8080 instead of 0.0.0.0:8080? 127.0. 0.1 is the localhost loopback address. 0.0.0.0 is a non-routable address.

Regards,
Michiel

Hi @michiel,

Thanks for responding!

Yes I tried 127.0.0.1:8080 but it’s also not accessible from the Bitnami WordPrss app.

The other stack of WordPress (MAMP) that I manually installed does work though, so I’m confused why this same code that I deployed in the Bitnami stack is not working.

Thanks!

Egdon

Hi @Egdon,

The localhost is available on the shared network IP. Can you try the following:

  • Open the VM terminal by clicking on “Open Terminal” in the VM window manager.
  • Run “arp -a”
  • The Python API should be accessible under the IP address that shows from the previous command and the 8080 port number.

Regards,
Michiel

1 Like

Hey Michiel,

It worked!

I would have never thought of that.

Thanks for your help!

Egdon

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.