I am installed Magento 2.3.4 in LEMP Most of the tutorial suggest use http://www.magento.local/ instead of ip address, how to change this into Nginx?
Hi @Aveeva
You have to edit secure/unsecure url from table 'core_config_data':
SELECT * FROM `core_config_data` WHERE `path` LIKE '%secure%'
and replace your required URL with this table.
After replace you need to flush cache:
php bin/magento cache:flush
If issue resolve, please click on 'Kudos' & Accept as Solution!
Hi @Aveeva
To access the Magento 2 URL with the 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 :
192.168.1.65:8087 www.magento.local
Then you can access your Magento 2 via this URL -
Refer this link for more details -
https://www.mgt-commerce.com/documentation/mgt-development-environment-usage-host-file
I hope it helps!
@Manthan Dave Really thank you, after i change this then to change url in the Store->configuration->general->web->Base url -> http://www.giri.local instead of http://192.168.1.64:8087/ error.
Hi @Aveeva
What error it's giving can you please share the screenshots or the error log ?
Its helps us to troubleshoot the issue.
@Manthan DaveFinally save, and my backend url http://www.giri.local/admin_1siev0/ geting error screenshot : https://snipboard.io/dOtLuT.jpg
Also configure nginx,
map $http_host $MAGE_RUN_CODE { default ''; grocery grocery; } server { listen 8087; server_name www.giri.local grocery; set $MAGE_ROOT /usr/share/nginx/html/giri; include /usr/share/nginx/html/giri/nginx.conf.sample; error_log /usr/share/nginx/html/giri/giri_error.log; access_log /usr/share/nginx/html/giri/giri_access.log; set $MAGE_MODE developer; set $MAGE_RUN_TYPE website; } upstream fastcgi_backend2 { server 127.0.0.1:9000; }
@Manthan Dave FYI frond-end & back-end return same error.
@Manthan Dave @Bhanu Periwal Any help to solve the issue after url updated to www.giri.local
@Manthan DaveI hope share the details you need, there is no error in error log, anything else i need to share?
@Manthan Dave@Bhanu Periwal Is it necessary to add my new domain to firewall? I am using Nginx.