I switched to LSWS and found it excellent. Soon another server is going to be switched. Both are primarily php sites.
I have one cPanel server where few of our own sites are running under proxied mod_perl on port82 using mod_proxy of apache. While trying to migrate our own server to LSWS we had issues with those sites.
Is there a How to for this to get working (i can contact DC and tell them to take a look) so that sooner or later i can migrate this server to LSWS with proxied mod_perl Apache.
cPanel default Apache + proxied mod_perl Apache works fine.
Do the proxied mod_perl pages have a common extension?
Alias /perl passes to (using mod_proxy) mod_perl apache running 1.3x httpd and 1.29/1.3 mod_perl
Extension is cgi and url's have query string also
or could just be script.cgi (normally on POST)
LiteSpeed can pass certain request to backend Apache running on a different port.
For example, you have Apache run on port 78, in LiteSpeed, "Apache Port Offset" is set to "2", so LiteSpeed will run on port 80, if set "Apache Handled Content" to ".cgi", LiteSpeed will forward all requests with suffix "cgi" to backend Apache.
It probably is different from your current setup, which the second Apache mod_perl instance probably is not managed by cPanel, but a custom Apache setup. LiteSpeed setup have everything controlled by cPanel sharing the same httpd.conf.
Make sure to set SSL port to 441 to make LiteSpeed use port 443.
Yes it's a custom compile and not cPanel's Apache as it's an overkill to run mod_perl from same instance of apache. So this is not possible i guess as of now?
You can use rewrite rule to tell LSWS to proxy request to the target Apache instance.
What you need to do is to define a "Web Server" external application from LSWS web console, with name of "127.0.0.1:82". Then define a rewrite rule like
RewriteRule (.*)\.cgi$ http://127.0.0.1:82/$1 [P]
Where exactly the rewrite rule has to be defined in LSWS?
I would want that all requests with
are handled by mod_perl apache running on port 82.
The application runs fine from LSWS but i want it to be running through mod_perl apache transparently.
If you use cPanel, the solution is easy.
If you configure LSWS via web console, you can create a proxy context with URI "/perl/" and use the Apache web server external app as the handler.
I would want to:
Run LSWS for all content except the one that i want to pass to 127.0.0.1:82 (mod_perl Apache)
The content that i want to pass to 127.0.0.1:82 has url like:
Alias /perl/ /home/cpanelusername/public_html/cgi-bin/
So basically anything with
in the URL has to go to mod_perl apache on port 82.
How do i go about this. I did setup the web server with 127.0.0.1:82 and did include the rewrite rule as suggested in earlier post but don't see access being passed to backend. In the admin area of the mod_perl script i still see:
Running under mod_perl: No
SERVER_PORT => 80
SERVER_PROTOCOL => HTTP/1.1
SERVER_SOFTWARE => LiteSpeed
So nothing served from 127.0.0.1:82 mod_perl apache.
Wish LSWS had obeyed ProxyPass and ProxyPassReverse.
I would want to use the 127.0.0.82 transparently.
PS: I have confirmed the Enterprise Version of LSWS with DC so this server would be switching to that.
add rewrite rule
RewriteRule /(perl.*)$ http://127.0.0.1:82/$1 [P]
at vhost configuration level.
If you use LiteSpeed with cPanel by reading httpd.conf, I would suggest use "Apache Handled Content" I suggested earlier, especially for shared hosting. For single large web site, you can use the rewrite rule.
|All times are GMT -7. The time now is 06:45 PM.|