1

I had xyz.mydomain.com subdomain in ubuntu server.It was working fine.

I just want to change that xyz to xyz1 , so i rename all folders as well as the virtual host settings in cd /etc/apache2/sites-available/

I used below commands...

cd /etc/apache2/sites-available/
sudo nano xyz1.mydomain.com
<VirtualHost *:80>
ServerName xyz1.mydomain.com
ServerAlias www.xyz1.mydomain.com
DocumentRoot /var/www/xyz1/
</VirtualHost>
<Directory /var/www/xyz1/>
        Options -Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
</Directory>
sudo a2ensite xyz1.mydomain.com
sudo /etc/init.d/apache2 reload
sudo a2enmod vhost_alias
sudo /etc/init.d/apache2 reload

Now i am unable to view xyz1.mydomain.com website. Is there any thing missing?

1 Answer 1

0

If your output posted is correct, you ended the <VirtualHost> statement before the <Directory> statement. Move the </VirtualHost> line to the end and reload your config.

4
  • I moved the </VirtualHost> line to the end. But still not working. It actually linking to "/etc/apache2/sites-available/ default" ...
    – Aravinthan
    Mar 12, 2014 at 6:51
  • Not sure.. Did you check the permissions/owner/group of the directories and files after you renamed them?
    – douggro
    Mar 12, 2014 at 7:04
  • There is no issues in permission also.. is there any other place need to configure?
    – Aravinthan
    Mar 12, 2014 at 7:52
  • Out of ideas, sorry.
    – douggro
    Mar 12, 2014 at 7:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .