wiggst3r Posted August 20, 2008 Share Posted August 20, 2008 Hi I have a domain, which when I type in the http://www it goes straight to the site and points at the correct directory. But when I point domain.co.uk it points to the old folder where the /var/www/site_old docs used to be. I have /var/www/site_new where http://www.domain.co.uk points to, yet domain.co.uk doesn't. My apache vhosts for the site are below. <VirtualHost www.domain.co.uk:80> ServerAdmin domain@domain.com ServerName www.domain.co.uk ServerAlias bullbrand.co.uk DocumentRoot /var/www/site_new <Directory /> Options FollowSymLinks # AllowOverride None </Directory> <Directory /var/www/site_new> Options Indexes FollowSymLinks MultiViews #AllowOverride None Order allow,deny allow from all # Uncomment this directive is you want to see apache2's # default start page (in /apache2-default) when you go to / #RedirectMatch ^/$ /apache2-default/ </Directory> LogLevel warn CustomLog /var/log/apache2/access.log combined ServerSignature On </VirtualHost> <VirtualHost www.domain.co.uk:443> ServerAdmin domain@domain.com ServerName www.domain.co.uk ServerAlias domain.co.uk SSLEngine On SSLCertificateFile /etc/apache2/ssl/www_domain_co_uk.crt SSLCertificateKeyFile /etc/apache2/ssl/www.domain.co.uk.key SSLCertificateChainFile /etc/apache2/ssl/www_domain_co_uk.ca-bundle DocumentRoot /var/www/site_new <Directory /> Options FollowSymLinks # AllowOverride None </Directory> <Directory /var/www/site_new> Options Indexes FollowSymLinks MultiViews #AllowOverride None Order allow,deny allow from all # Uncomment this directive is you want to see apache2's # default start page (in /apache2-default) when you go to / #RedirectMatch ^/$ /apache2-default/ </Directory> ErrorLog /var/log/apache2/error.log CustomLog /var/log/apache2/access.log combined ServerSignature On </VirtualHost> Nothing in what you can see above points anything to /var/www/site_old So I'm really confused as to why this is happening. I've tried to redirect domain.co.uk to http://www.domain.co.uk but it hasn't worked Any ideas? Quote Link to comment Share on other sites More sharing options...
trq Posted August 20, 2008 Share Posted August 20, 2008 Do you need bullbrand.co.uk? Either way, simply add another ServerAlias. ServerAlias bullbrand.co.uk domain.co.uk Quote Link to comment Share on other sites More sharing options...
AjBaz100 Posted August 21, 2008 Share Posted August 21, 2008 You could try creating a virtual host that has a ServerName of domain.co.uk ??? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.