By ksuren
I have site deployed and running on CentOS 8, Apache at http://127.0.0.1:81
$ sudo netstat -tulpn | grep LISTEN
tcp6 0 0 :::81 :::* LISTEN 32040/httpd.bin
I can see the site response when using:
$ curl -v http://127.0.0.1:81
$ vi /etc/hosts
# The following lines are desirable for IPv4 capable hosts
127.0.0.1 magento-centos8-1 magento-centos8-1
127.0.0.1 localhost.localdomain localhost
127.0.0.1 localhost4.localdomain4 localhost4
When trying to http://138.197.235.67 or http://138.197.235.67:81 redirects me to http://127.0.0.1/index.php/
What am i missing?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
After some research, found the solution.
Change the Apache httpd.conf file usually at /etc/httpd/conf/http.conf file as below and restart Apache. You site should load from http://STATIC_IP
<VirtualHost *:81>
ServerName STATIC_IP
ServerAlias STATIC_IP
DocumentRoot "/opt/magento-2.3.5-1/apps/magento/htdocs"
Include "/opt/magento-2.3.5-1/apps/magento/conf/httpd-app.conf"
</VirtualHost>
In the above example:
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.