I run a wordpress on AWS, the public domain assigned by AWS is “ec2-23-23-124-60.compute-1.amazonaws.com”, and the virtualhost setting is as following:
<VirtualHost *:80>
ServerName remykits.com
DirectoryIndex index.php
DocumentRoot "/home/mysite/sites/blog"
LogLevel info
ErrorLog /var/www/vhosts/domain.com/log/error.log
CustomLog /var/www/vhosts/domain.com/log/access.log combined
</VirtualHost>
but when I click a link in my blog, the url changes to “http://ec2-23-23-124-60.compute-1.amazonaws.com/”, I have no idea how to solve it.
I think this more of a WordPress issue than an Apache one. Go into your Admin panel, go to Options and change your Site URL to point to remykits.com. Your links should now use this as the
base_urlfor the site.If your Apache configuration was incorrect, your WordPress installation would most likely not even render. Your
ServerNameis correct, which is the most important thing.