LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 05-27-2012, 12:26 PM   #16
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,769

Rep: Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283Reputation: 1283

Now everything resolves correctly. You can flush your dns to check, or you can wait until dns changes are propagated
You also need to clear your browser cache.

@robertjinx
There is no need for a default "website". It's the first vhost defined in sites-available/default. See the output of "apache2 -S"
 
Old 05-27-2012, 12:45 PM   #17
kevtucker
LQ Newbie
 
Registered: Feb 2003
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by robertjinx View Post
Create a vhost with localhost and DocumentRoot as it's set by default in the httpd.conf

You dont need ServerAlias for this.

Code:
<VirtualHost *:80>
 DocumentRoot [where the documentroot is set in httpd.conf]
 ServerName localhost
</VirtualHost>
and thats it.
Doing that throws up all this after /etc/init.d/apache2 restart

[Sun May 27 16:51:27 2012] [error] VirtualHost localhost:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Sun May 27 16:51:27 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Sun May 27 16:51:27 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Sun May 27 16:51:27 2012] [warn] NameVirtualHost 192.168.1.103:80 has no VirtualHosts
... waiting [Sun May 27 16:51:28 2012] [error] VirtualHost localhost:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Sun May 27 16:51:28 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Sun May 27 16:51:28 2012] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
[Sun May 27 16:51:28 2012] [warn] NameVirtualHost 192.168.1.103:80 has no VirtualHosts
[ OK ]

I've changed it back to how it was before without the additional host

Bathory : Did I change my DNS on Fasthosts correctly then ? Its still the same after Restart and Browser cache clear. I should wait a few hours for the DNS to propagate you recon ?

Thanks for help

Kevin
 
Old 05-27-2012, 12:49 PM   #18
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 546

Rep: Reputation: 58
Strange, but ok.
 
Old 05-27-2012, 12:58 PM   #19
kevtucker
LQ Newbie
 
Registered: Feb 2003
Posts: 17

Original Poster
Rep: Reputation: 0
We can now put this to SOLVED !!!!

Suddenly it's working

now when i goto example2.com it goes straight to www.example2.com

Thing it may have been to do with the DNS Records on Fasthosts.co.uk server having the additional ip address with no www prefix on it.

Thank you bathory for all your help and robertjinx for your suggestion.
 
Old 05-27-2012, 03:45 PM   #20
kevtucker
LQ Newbie
 
Registered: Feb 2003
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by kevtucker View Post
We can now put this to SOLVED !!!!

Suddenly it's working

now when i goto example2.com it goes straight to www.example2.com

Thing it may have been to do with the DNS Records on Fasthosts.co.uk server having the additional ip address with no www prefix on it.

Thank you bathory for all your help and robertjinx for your suggestion.
It is fully working now as I have just successfully transfered both websites to a new Ubuntu Server from Ubuntu desktop and managed to move both Wordpress databases too and all working perfectly.

Thanks again.
 
  


Reply

Tags
apache2, redirect, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 - having trouble setting up multiple domains under debian etch walterbyrd Linux - Software 3 01-08-2010 07:03 PM
[SOLVED] Apache2 - virtual host defaulting to default host slimjim Linux - Server 1 10-31-2009 01:47 AM
Virtual Host Redirect Issue DigiDave Linux - Software 1 10-23-2003 01:40 PM
Apache Virtual Host Redirect granny Linux - Networking 5 05-22-2003 01:20 PM
How do we direct Multiple Domains to the Same Mail host? eciit Linux - Networking 1 08-26-2002 05:44 AM


All times are GMT -5. The time now is 11:30 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration