Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Dec 01, 2008 8:59 pm 
Offline
Senior Newbie

Joined: Thu Apr 07, 2005 4:50 pm
Posts: 16
Hi Guys ....

I have 2 domains and I setup a 2 Virual Host entries in my http.conf file.

Code:
NameVirtualHost 64.62.190.109:80

<VirtualHost 64.62.190.109:80>
    ServerName www.reelanglers.net
    ServerAlias reelanglers.net
    DocumentRoot "/var/www/html"
    DirectoryIndex index.html
</VirtualHost>

<VirtualHost 64.62.190.109:80>
    ServerName www.rodvictoria.net
    ServerAlias rodvictoria.net
    DocumentRoot "/var/www/html/blog/wordpress"
    DirectoryIndex index.php
</VirtualHost>


It's frustrating because it looks like I have everything configured right, but when I try to go to my new domain it points to my fishing site.

I have restarted httpd after making these changes.

The other strange thing is that it redirects to the reelanglers site when trying to go to the rodvictoria site.

Strange!


Top
   
 Post subject:
PostPosted: Mon Dec 01, 2008 9:35 pm 
Offline
Junior Member

Joined: Wed May 21, 2008 5:34 am
Posts: 46
Website: http://www.eve-razor.com/forum
Location: Austin, Tx
if you only have one ip address you dont need to bind your virtualhost's to a specific ip address.

aside from that your config matches might fairly close and I post 3 sites of the same node/ip address.

Code:
<VirtualHost *>
        ServerName killboard.eve-razor.com
        ServerAlias killboard.eve-razor.com
        DocumentRoot /var/www/killboard
</VirtualHost>

<VirtualHost *>
        ServerName membertracker.eve-razor.com
        ServerAlias membertracker.eve-razor.com
        DocumentRoot /var/www/membertrack
</VirtualHost>


make sure you DNS is pointing to the server for both domains ofc.


Top
   
 Post subject:
PostPosted: Mon Dec 01, 2008 9:45 pm 
Offline
Senior Member

Joined: Sun Aug 31, 2008 4:29 pm
Posts: 177
I tried going to rodvictoria.net, and when it started to load i was redirected to reelanglers.net.

I don't think that's an Apache issue. I'd suggest checking the wordpress configuration at the rodvictoria.net site.


Top
   
 Post subject:
PostPosted: Mon Dec 01, 2008 10:59 pm 
Offline
Senior Member

Joined: Mon Jun 16, 2008 6:33 pm
Posts: 151
The documentroot of RodVictoria.net is a subdirectory of ReelAnglers.net -- the .htaccess (or php code) of the latter could be withholding directory access.

-- I'd put them in separate directories regardless, as per MrRx7.


Top
   
 Post subject:
PostPosted: Tue Dec 02, 2008 1:29 am 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
www.rodvictoria.net is responding with "301 Moved Permanently" and redirecting to reelanglers.net. The headers include your PHP version and some Wordpress stuff too, so it's your Wordpress configuration that's causing the problem.

This can happen if something is amiss in your .htaccess file, or else you'll need to find out which URL your Wordpress installation thinks it's on. Wordpress has the nasty habit of remembering the URL where it was first installed. It behaves strangely when you move the files afterwards.

Use something like phpMyAdmin to open the Wordpress database.
Open the "wp_options" table.
Find "siteurl" (option id: 1) and "home" (option id: 39 on second page).
Both of them should be http://www.rodvictoria.net/ or whatever else you want your blog's address to be.

And as mjrich said, you probably want to put the two domains in separate directories even if Apache doesn't complain about it. Right now, one of your sites is accessible also as a subdirectory of another site. This will probably hurt your search engine ranking.


Top
   
 Post subject:
PostPosted: Tue Dec 02, 2008 6:34 pm 
Offline
Senior Newbie

Joined: Thu Apr 07, 2005 4:50 pm
Posts: 16
Awesome!

I moved the directory and also edited the database and it is now working properly!

Thanks So Much!!!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group