Report this

What is the reason for this report?

virtual domains ubuntu www. pointing to wrong server folder!!

Posted on October 16, 2013
iam

By iam

Hi,

not sure if this has happened to anyone but I have 2 droplets one works the other is doing something strange.

When I go on my browser and type www.mydomain.com the browser is pointed to var/www/ But when I type in mydomain.com my browser shows the site which sits in var/www/mydomain.com/

in the folder is a Wordpress run site.

I have these DNS settings:

www CNAME @

  • CNAME @

I also have the virtual domains …/apache2/sites-available/mydomain.com

ServerAdmin webmaster@localhost ServerName mydomain.com ServerAlias www.mydomain.com DocumentRoot /var/www/mydomain.com/ …

I just can’t work out where the problem lies, does anyone have any ideas?

Thanks



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

What’s the output of <code>ls -la /var/www</code>

Are you trying to associate both droplets with the same domain, i.e. mydomain.com? <br> <br>Also, do you have the Apache re-write module activated?

Hi, no they are different domain names on both droplets but the settings are the same with different domain names in the files obviously. <br> <br>My module rewrite is also active!! just seems dead strange its pointing to sub level folder on www <br> <br>Thanks for your input

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.