Friday, September 13, 2019

virtualhost - Web server showing IP address instead of domain name

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



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"

AllowOverride ALL

Order allow,deny
Allow from all
Require all granted


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...