简体   繁体   中英

Why doesn't work my-domain.com with www

I installed and setupped drupal on my vps /digitalocean.OS: ubuntu 14.04. I go to www.my-domain.com doesn't work but if i write my-domain.com its work correctly.Why? i wait your advice. I use apache2. its my drupal.conf /etc/apache2/sites-available/drupal.conf

 <VirtualHost *:80>
   ServerAdmin admin@my-domain.com
   DocumentRoot /var/www/html/drupal/
   ServerName www.my-domain.com
   ServerAlias my-domain.com *.my-domain.com

   ErrorLog /var/log/apache2/my-domain.com-error_log
   CustomLog /var/log/apache2/my-domain.com-access_log common
</VirtualHost>

www is a sub domain that needs to be setup on your dns.

You need 3 records: A - your-domain.com. - VPSIP A - @ - VPSIP CNAME - www - your-domain.com.

don't forget the dot at the end of the domain. It can take a while for this to update.

Please verify and update Site URL in Drupal instance. Base URL in drupal would have to be updated as www.my-domain.com.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM