Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using an AWS EC2 micro instance to run a wordpress blog.

I've successfully mapped a subdomain to the Elastic IP for the micro instance. After a few minor changes, the URL I mapped to the Elastic IP (blog.example.com) opens up the wordpress home page but whenever I click on any of the wordpress links the domain changes to the AWS public DNS for that instance (http://ec2-123-45-678-910.compute-1.amazonaws.com/wordpress/).

How do I fix the URLs so that they all follow the subdomain I have setup?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

I used to following command to apply the host name change to the machine.

sudo /opt/bitnami/updateip --machine_hostname blog.example.com 

After that the URLs were fixed.

If using a Bitnami AMI, be sure to modify the updateip file in /opt/bitnami/ to something like updateip.orig. This prevents the hostname from being changed on reboot.

share|improve this answer
    
That might not stick after a reboot, though. EC2 automatically updates the machine's hostname, because it can change when the server is restarted. –  ceejayoz May 2 '12 at 14:22
add comment

I think that there's a setting in wordpress that forces the base address of links. Or you can rewrite the servername in webserver.

share|improve this answer
    
Thanks, @theist. I ended up using am 'updateip' tool that was included in the install. I believe this went into the mysql database and made the necessary changes. Now the URLs look like they should (except for the '/wordpress' which I am still trying to get rid of). –  bnjmn Nov 14 '11 at 16:39
    
sudo /opt/bitnami/updateip --machine_hostname blog.example.com –  bnjmn Nov 14 '11 at 16:42
    
Offtopic: Thanks? Reward the useful answers with upvotes and select one if it's a good solution. If you have the correct solution answer your own question, this improves the site :) –  theist Nov 22 '11 at 11:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.