0

I'm running a web server (Apache2) on CentOS 7. I have the following virtual host file. The site is being served as it should. However, the URL is changed in the browser (any browser) from the domain name verizondecom.com to the server's IP address.

What needs to be changed so that the URL is the domain name and not the server's IP?

NameVirtualHost *:80

<VirtualHost *:80>
   ServerName www.verizondecom.com
   ServerAlias verizondecom.com
   ErrorLog /var/log/httpd/verizondecom.err
   CustomLog /var/log/httpd/verizondecom.log combined
   DocumentRoot /var/www/www.verizondecom.com/public
   SetEnv ENVIRONMENT "production"
<Directory "/var/www/www.verizondecom.com/public">
   AllowOverride ALL
   Order allow,deny
   Allow from all
   Require all granted
</Directory>
</VirtualHost>
scott80109
  • 153
  • 4
  • 11
  • 1
    I'd look at the software running on the server, to see how it's configured. It could be generating links or redirects by IP rather than domain name. What's the application? – Tim Nov 13 '17 at 19:35
  • 2
    Your site has a Microsoft IIS server answering requests, not an Apache server. You should look there. – Michael Hampton Nov 13 '17 at 20:31
  • No. It is definitely a Linux server running Apache. I built the server myself. – scott80109 Nov 13 '17 at 21:05
  • Please check if there is a Redirect directive in your configuration. Anyway, the IP where the site is redirected is not the IP of DNS records (184.168.221.15) but one provided by Time Warner (70.61.231.8 - rrcs-70-61-231-8.central.biz.rr.com.) – J.M. Robles Nov 14 '17 at 04:00

2 Answers2

2

Have you checked if dynamic content on DocumentRoot is doing this redirection? There is any .htaccess on DocumentRoot? Seems like some processing running inside your application.

  • Yeah I had the issue for MediaWiki that the program itself changes the url name – qwr Feb 28 '21 at 09:06
0

The problem was in the settings for the domain name at GoDaddy. They had improperly configured it so that the IP address was being sent instead of the domain name.

scott80109
  • 153
  • 4
  • 11