LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Apache Migration/Compatibility > Importing an Apache Vhost to Existing Litespeed Installation

Reply
 
Thread Tools Display Modes
  #1  
Old 11-09-2011, 04:56 PM
docarzt docarzt is offline
New Member
 
Join Date: Oct 2011
Posts: 4
Default Importing an Apache Vhost to Existing Litespeed Installation

Hello,

I have Litespeed for cPanel and my situation is as follows:

I partner with another company and they had a vhost setup (tvovermind.zap2it.com) that simply sent all traffic to my ip/dns. Now we've moved to our own domain and the engineer at the company sent me the following vhost info to add to my "apache config" so that my server would redirect requests coming through the vhost to the new root domain:

<VirtualHost *:80>
ServerName tvovermind.zap2it.com
RewriteEngine On
RewriteRule ^(.*)$ http://www.tvovermind.com$1 [R=301,L]
</VirtualHost>

Obviously since I'm not running Apache, this does me no good and my server tech is MIA. How do I port this directive to the existing litespeed install?

Thanks in advance.
Reply With Quote
  #2  
Old 11-09-2011, 05:16 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
you can put the rewrite rules in .htaccess under vhost docroot. make sure vhost AllowOverride is set to FileInfo at least to make .htaccess effective.
Reply With Quote
  #3  
Old 11-09-2011, 05:26 PM
docarzt docarzt is offline
New Member
 
Join Date: Oct 2011
Posts: 4
Quote:
Originally Posted by webizen View Post
you can put the rewrite rules in .htaccess under vhost docroot. make sure vhost AllowOverride is set to FileInfo at least to make .htaccess effective.

I tried and it won't work because I need to trick litespeed into believing tvovermind.zap2it.com is on my server and redirect those requests to tvovermind.com. Hence the reason to add the vhost to apache, or in this case litespeed, config....
Reply With Quote
  #4  
Old 11-09-2011, 05:37 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
make sure DNS of tvovermind.zap2it.com point to the server served by litespeed. you can test with below if DNS is not ready.
Quote:
curl -I -H "host: tvovermind.zap2it.com" http://IP_address_of_litespeed_server
should see a 301 redirect.
Reply With Quote
  #5  
Old 11-09-2011, 05:45 PM
docarzt docarzt is offline
New Member
 
Join Date: Oct 2011
Posts: 4
Quote:
Originally Posted by webizen View Post
make sure DNS of tvovermind.zap2it.com point to the server served by litespeed. you can test with below if DNS is not ready.


should see a 301 redirect.
Yes this is working for root domain only. for some reason links like:

tvovermind.zap2it.com/greys-anatomy/greys-anatomy-sneak-peeks-season-8-episode-9-dark-was-the-night/103776

are not redirecting. the server guy at tribune sent the vhost entry as the fix. Maybe there is an issue with the htaccess...

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Options -Indexes

RewriteEngine On
RewriteRule (.*) http://www.tvovermind.com/$1 [R=301,L]

that is what we have in there.
Reply With Quote
  #6  
Old 11-09-2011, 05:49 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
you should remove the rules for WP. you are doing redirect for everything. no need to keep them.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:27 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.