Installing magento using command line:
1. able to access the server using http://localhost
2. unable to access using the http://ip or http://domain-name
3. updated the base-url to ip and to domain name etc., sitll unable to access out of the machine where magento is installed.
4. followed the steps from both
https://devdocs.magento.com/guides/v2.2/install-gde/install/cli/install-cli.html
https://cloudkul.com/blog/magento-2-1-x-installation-linux-ubuntu/
any suggestions on what i am missing in configurion
Solved! Go to Solution.
@abhishek_puligundlaSeems like you have installed Magento on a separate server. You want to access that Magento from your computer. You want to browse it using domain name instead of IP.
If above condition is true then below is what you need to do.
Magento Server (eg ip - 192.168.1.2): Make a host file entry as below.
127.0.0.1 www.YOURWEBSITENAME.com YOURWEBSITENAME.com
Your Machine: Make a host entry as below.
192.168.1.2 www.YOURWEBSITENAME.com YOURWEBSITENAME.com
Note: Make sure you are able to ping Magento server IP or both machine are on same network. If you are on same network and connected to a DNS server then you can make a DNS entry in DNS server to avoid host entry in your host file. Everyone in the network will be able to browse Magento using domain name in the same network.
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.
To access the magento 2 url with domain name you need to add its entry in hosts file !
So open your etc/hosts file if you are using ubuntu !
Then you need to specify your ip address along with domain name like below :
127.0.0.1 abc.mycompany.com/magento2
Then you can access your magento 2 via this url -
abc.mycompany.com/magento2
Refer this link for more details -
https://www.mgt-commerce.com/documentation/mgt-development-environment-usage-host-file
Hope it helps !
Hi @Manthan Dave,
Thanks for the suggestion.
I already tried that
I have set both 127.0.01 domain_name and 192.x.x.x. domain_name in /etc/hosts file and restarted the apache2 service.
if i set the base-url of magento to http://ip/ i am able to access using ip but not with domain_name.
The main issue i am facing is that i am unable to access magento server from other computers
Well i understand your problem !
As you mention that if you set the base-url of magento to http://ip/ you are able to access using ip but not with domain_name. - It is true !
Because when you want your user can access your website using domain instead of ip - then they also need to make a host entry in their hosts file !
As mention above in your hosts file you need to add that ip address with domain name
127.0.0.1 www.google.co.in
then and then they can access website using domain name instead of ip address
Hope you understand !
@abhishek_puligundlaSeems like you have installed Magento on a separate server. You want to access that Magento from your computer. You want to browse it using domain name instead of IP.
If above condition is true then below is what you need to do.
Magento Server (eg ip - 192.168.1.2): Make a host file entry as below.
127.0.0.1 www.YOURWEBSITENAME.com YOURWEBSITENAME.com
Your Machine: Make a host entry as below.
192.168.1.2 www.YOURWEBSITENAME.com YOURWEBSITENAME.com
Note: Make sure you are able to ping Magento server IP or both machine are on same network. If you are on same network and connected to a DNS server then you can make a DNS entry in DNS server to avoid host entry in your host file. Everyone in the network will be able to browse Magento using domain name in the same network.
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.