I successfully deployed the latest Magento 2.4.1 on Ubuntu 18.04, PHP, Nginx with letsencrypt cert.
Previously, when i visit my domain i was able to see the magento 2 welcome page. After having made the Command line installation successfully and got the unique link to admin panel, visiting magento through the browser is returning a server not found error.
When i send a GET request to local host (NOT https) from server side, it returns the following Nginx welcome page.
curl -XGET http://localhost
<title>Welcome to nginx!</title>
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
Commercial support is available at
<p><em>Thank you for using nginx.</em></p>
I am able to successfully ping my connected domain over the internet which returns the actual server IPv4 address
root@pc:~# ping domain.com
PING domain.com (xxx.xx.xxx.xx) 56(84) bytes of data.
64 bytes from xxx.xx.xxx.xx (xxx.xx.xxx.xx): icmp_seq=1 ttl=53 time=161 ms
64 bytes from xxx.xx.xxx.xx (xxx.xx.xxx.xx): icmp_seq=2 ttl=53 time=82.6 ms
64 bytes from xxx.xx.xxx.xx (xxx.xx.xxx.xx): icmp_seq=3 ttl=53 time=105 ms
If i ping my domain with “www.” before it retuns the below
root@pc:~# ping **www**.domain.com
ping: www.domain.com: Name or service not known
I have magento installed in var/www/ instead of var/www/html but i made the necessary changes in default.conf as well as nginx.conf and the sample configuration file in the magento2 filesystem configuration (nginx.conf.sample)
The solution may be something very simple that i missed, does anyone have an idea?