apache - IP of Web server stays in URL instead of showing Domain Name -
so lets have domain name "www.example.com" , have "http-redirect" server "1.1.1.1" apache2 running on ubuntu 14.04 server amd64. have web files on server , working perfect. not working right url. instead of "www.example.com/sites.php" if have "1.1.1.1/sites.php". how can fix this?
did far:
disabled default virtual host , created new one:
<virtualhost *:80> serveradmin bla servername example.com serveralias www.example.com documentroot /var/www errorlog ... customlog ... </virtualhost>
(it's typed, since can't copy console..)
i tried enter in /etc/hosts
1.1.1.1 www.example.com
thanks help
as discussed in comments, reason see ip address in browser http-redirect pointing directly to ip address, there's no domain name display.
redirect tells browser go elsewhere , browser fetches website supplied url, same if you'd click on link. if redirect url 1.1.1.1/sites.php see in browser.
Comments
Post a Comment