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

Go Back   LiteSpeed Support Forums > External Applications > Apache Migration/Compatibility > Forwards all requests to Litespeed from Apache, setup

Reply
 
Thread Tools Display Modes
  #1  
Old 09-27-2006, 04:16 AM
sid137 sid137 is offline
New Member
 
Join Date: Sep 2006
Posts: 4
Default Forwards all requests to Litespeed from Apache, setup

Hi,


I'm not sure if this is the best place to ask or not.. But I'm installing a rails app for a client, and would like to use Litespeed to serve everything. However, the people that manage their server don't want to get rid of Apache because its integrated with all of their monitoring processes and everything. Is there anyway to set up Apache to forward all requests from a particular domain name, to the Litespeed server, so that it serves all of the pages?


www.domain.com:80 (apache) -> localhost:8088 (litespeed)
domain.com(apache) -> localhost:8088 (litespeed)

Both servers are running on the same machine, and Litespeed is running on :8088 with the ruby-lsapi

Thanks,
-Sidney
Reply With Quote
  #2  
Old 09-27-2006, 09:45 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Yes, you can configure Apache with it reverse-proxy feature to forward everything to LiteSpeed on that domain. It is pretty easy to do, please consult Apache's manual.

However, it is not a optimal solution and you will get much less benefit than using LiteSpeed directly. With LiteSpeed's built-in watch-dog feature, there is not much need for additional monitoring work.

If that server has multiple IP addresses and that domain got its dedicated IP, you can let LiteSpeed bind to that IP on port 80 to serve that domain directly, the other sites can still be served by Apache. If the site owner is happy with the results, more sites can be converted later on.
Reply With Quote
  #3  
Old 09-28-2006, 12:57 PM
shanx24 shanx24 is offline
Member
 
Join Date: Sep 2006
Posts: 17
Default On Cpanel, how to do this?

Hi:

I thought I'd start a new thread but my question is related to this one.

I have a Cpanel/WHM setup as common. I set up LSWS as root user, and it works when I do http://localhost:81 from the command prompt, but http://mydomain.com:81 from the browser does not work.

What step have I missed? How can I make sure that first the port 81 works, and then the port 80 works on my website (I will perhaps change the HTTPD.CONF port of Apache from 80 to something else at that point?)

Also, few other questions --

1. If I install as root, I want to be able to use this server for EVERY other domain registered under Cpanel.

2. Given that PHP5 and MySQL5 are unrelated to the server, if I simply copy all my directories will they work? Which begs the other question -- will my other domains (non root) have to move the files somewhere else?

3. What are the recommended settings for a very high traffic PHP based site that includes lots of reporting and graph generation with Flash. Should I use keep-alive? How many concurrent users should I set it up to be? How can I use anti-DOS features, security, etc? Would appreciate some pointers.

Many thanks,
Shanx
Reply With Quote
  #4  
Old 09-28-2006, 01:33 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
When you install LiteSpeed, make sure you let LiteSpeed run as the same user as that of Apache.
Then use our "Use Apache Configuration feature"
http://www.litespeedtech.com/docs/we...loadApacheConf

You can use the "port offset" to try LiteSpeed along side with Apache, make sure NOT to use the same port 81 that LSWS is using.

You don't need to do anything else, all domains registered under Cpanel shoud work properly.

For anti-DoS feature please read the "Howto" section in doucment comes with the server package.
Reply With Quote
  #5  
Old 09-28-2006, 02:20 PM
shanx24 shanx24 is offline
Member
 
Join Date: Sep 2006
Posts: 17
Quote:
Originally Posted by mistwang View Post
When you install LiteSpeed, make sure you let LiteSpeed run as the same user as that of Apache.
Then use our "Use Apache Configuration feature"
http://www.litespeedtech.com/docs/we...loadApacheConf

You can use the "port offset" to try LiteSpeed along side with Apache, make sure NOT to use the same port 81 that LSWS is using.

You don't need to do anything else, all domains registered under Cpanel shoud work properly.

For anti-DoS feature please read the "Howto" section in doucment comes with the server package.
Thanks. Questions:

1. Excuse my ignorance but how do I find out what user is running Apache? If I have already installed LS, and followed default commands (installed with user 'nobody') then what can I do now?

2. Also, isn't this the less optimal way of running LS -- through Apache config?

3. I did not get your point about port offset at all. Should I use port 81 for LSWS, or not? Is LiteSpeed different from LSWS (so it would seem from your post). Presuming I need to change the port, where should I go to change this, is there a lshttpd.conf file or something?

Thanks
Reply With Quote
  #6  
Old 09-28-2006, 02:37 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Quote:
1. Excuse my ignorance but how do I find out what user is running Apache? If I have already installed LS, and followed default commands (installed with user 'nobody') then what can I do now?
"ps -ef | grep httpd" or check /usr/local/apache/conf/httpd.conf, it is nobody, you don't need to do anything, otherwise, remove the lsws directory, run install.sh again.

Quote:
2. Also, isn't this the less optimal way of running LS -- through Apache config?
If you want to manage your sites through Cpanel, it is the way to go.


Quote:
3. I did not get your point about port offset at all. Should I use port 81 for LSWS, or not? Is LiteSpeed different from LSWS (so it would seem from your post). Presuming I need to change the port, where should I go to change this, is there a lshttpd.conf file or something?
There are two ports you need to specify during installation, amdin port and service port, admin port is default to 7080, service port is default to 8088. you probably changed service port to 81.
When port offset is specified, LSWS will use port "80 + <port offset>" for sites configured in httpd.conf, if you set "port offset" to "1", the port to be used is 81, which is the same as the service port specified during installation, it may or may not work, to avoid the possible confliction, you should not set "port offset" to "1", but use something else.

Hope this helps.

After everything has been verified to be working properly with Litespeed, you can stop Apache, set "port offset" to "0", restart LSWS, then LiteSpeed will replace Apache by taking over traffic on port 80.
Reply With Quote
  #7  
Old 09-28-2006, 03:14 PM
shanx24 shanx24 is offline
Member
 
Join Date: Sep 2006
Posts: 17
Hi

I installed it again. It never asked me anything like Port Offset. I am trying the Enterprise version as I have two CPUs. I used default 7080 for admin, and 8088 for regular. Now when I type http://mydomain.com:7080 for admin, the browser times out. The user is nobody, which is what I used, and which is what is used in Apache's httpd.conf. What's up?

Thanks for your help.
Reply With Quote
  #8  
Old 09-28-2006, 03:48 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
I think port 7080 is blocked by firewall.
Reply With Quote
  #9  
Old 09-28-2006, 05:04 PM
shanx24 shanx24 is offline
Member
 
Join Date: Sep 2006
Posts: 17
Thanks, may be. But you mean firewalkl on the server or the PC I use? I am using zonealarm and am pretty sure 7080 is not blocked. How can I check what my firewall is blocking on the server side (CentOS server)? Cheers!
Reply With Quote
  #10  
Old 09-28-2006, 07:39 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
That's the firewall on the server side, depends on what kind of iptables management software is used, you may found iptable rules in /etc/sysconfig/iptables, just add a similar line for port 7080 like that of port 80. then do "service iptables restart", if /etc/sysconfig/iptables is not there, you are on your own to figure it out, Google is your friend.
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 06:01 PM.



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