user-44651
user-44651

Reputation: 4124

Azure VM does not serve external website

Wordpress site works fine using localhost.

Trying to hit the DNS (mysite.cloudapp.net) or the public IP, shows just the generated version of the site below. Clicking links results in an "unable to connect" error.

Anyone know what I might be doing wrong?

enter image description here

Upvotes: 0

Views: 125

Answers (3)

Gary Liu
Gary Liu

Reputation: 13918

By default, when you finish installing wordpress, the address URL is set to http:/localhost/wordpress

When you browse your site with DNS, the resources file urls are still referring to like http://localhost/......

So, we need to sign in wordpress admin portal in your VM, click “setting”=>”general”, set “WordPress Address (URL)” and “Site Address (URL)” to http://<your_vm_name>.cloudapp.net/wordpress, and save changes.

If you have any further concern, please feel free to let me know.

Upvotes: 1

TheNappingKat
TheNappingKat

Reputation: 61

So one thing you can do is see if you can log into /WP-admin and check the home and url links under Settings>General to see if they match site.cloudapp.net. If they do you might also want to check under your wordpress's theme files in functions.php and add the following lines to the top after <?php

update_option('siteurl','http://example.com');
update_option('home','http://example.com');

Upvotes: 0

ajankuv
ajankuv

Reputation: 497

wordpress is normally url based, make sure it's configured for wildcard or the cloudapp.net domain.

Upvotes: 0

Related Questions