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 [email protected]

        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 [email protected]

        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
https://forums.phpfreaks.com/topic/120525-apache-url-with-and-without-the-httpwww/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.