How to change the IP address to make magento accesible on the web?

Keywords: Magento - Linux - How to - Domain Name (DNS)
Description:
Hi, I installed the latest bitnami linux installer for magento on Ubuntu 20.04 LTS on a local machine. By default the installer suggests me to use 127.0.1.1 as the IP address. If I change the IP to 192.168.XX.XX(at installation time), I am able to access the magento website within my local network.

Now I want to move my store to production(hosting from the local machine). My ISP does not offer a static IP, so I have a script in place to periodically check my IP and use Dynamic DNS so that it always points to the right IP.

I found the documentation to update the IP of the magento store here: https://docs.bitnami.com/bch/apps/magento/administration/update-ip-hostname/

But it seems like this is only valid for cloud deployments. I am looking for a way to do this from a local deployment. Thanks.

Hi @RedCardRef,

You can also use the bnconfig tool in your local deployment

https://docs.bitnami.com/installer/faq/linux-faq/configuration/understand-bnconfig/

cd installdir/apps/magento
./bnconfig --machine_hostname YOUR_DOMAIN_OR_PUBLIC_IP

Happy to help!


Was my answer helpful? Click on :heart:

Thanks for the reply,
I set the IP address as 192.168.0.100 when using the installer and then ran the command you provided above. But I am getting the following error.

Error running /home/sai/magento-2.4.2-1/common/bin/curl --location --silent --get --request GET “49.206.XXX.XXX”: child process exited abnormally

where 49.206.XXX.XXX is my public IP. I was able to render part of the website when I tried to access magento from the internet on a different machine. I think I am getting close to get this working.

Using the bitnami linux installer was by far the easiest way to get magento up and running quickly. This is one of the final pieces in my workflow that I am trying fix.

I tried experimenting with the VM(.OVA) file with windows as the host machine. But I was not able to get that working. I feel that most of the documentation is focused towards cloud deployments and maybe a tutorial on local deployment would be helpful.

hi @RedCardRef,

Can you try to run the bnconfig tool again? It seems it didn’t finish changing the values in the configuration or in the database. If you get the same error again, we will let you know how to manually edit those values

The Bitnami solutions work the same way when you use the local installers or a cloud deployment. Please note that you can also find useful information about the local installations in our documentation

https://docs.bitnami.com/installer/

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