I have hosted a website using PHP and MySQL on ubuntu. It worked well but somehow suddenly, web resources are not loading when the URL includes the domain but do load when the URL contains the IP address.
eg. mywebsite.com
is working fine but mywebsite.com/anything
is not XXX.XX.XX/anything
is working just fine.
Please help me in finding the source of the problem. I checked the subfolders, all files are present there.
Conf file in sites available:
<VirtualHost *:80> ServerName mywebsite.org ServerAlias www.mywebsite.org DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
Error logs: Server Log: HTTP: failed to make connection to backend Browser o: Failed to load resource: the server responded with a status of 404 (Not Found)
Advertisement
Answer
There was an issue with the domain name. the URL was being redirected to the wrong IP