Jump to content

apache URL with and without the http://www


wiggst3r

Recommended Posts

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.