Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 21, 2012, 03:27:14 AM

Pages: [1] 2   Go Down
  Print  
Author Topic: Installing Mod_Perl for Boosting Apache Performance...  (Read 2011 times)
The Natural Greek Phenomenon
Intergalactic Superstar
*****
Offline Offline

Posts: 144


WWW
« on: June 01, 2005, 05:17:00 PM »

Greetings,

Having read some impressive comments about mod_perl
giving Apache a speed-boost, I'd love to hear comments
and even installation instructions for this Apache modification.

The tutorial given in this forum are great and graspable so,
posting a step-by-step mod_perl installation tutorial for rookies
(like me) would be excellent!

Thanks,
George

Apache info:
Code:
Apache/1.3.33 (Unix) /Perl version = 5.008006
Logged
abhilash
Intergalactic Cowboy
*****
Offline Offline

Posts: 61



« Reply #1 on: June 02, 2005, 05:26:25 AM »

Hi George,

Yes it will help in speeding up CGI scripts. If you have too many CGI scripts or in other words, if more than 50% of your website is supported by cgi scripts, mod_perl is recommended. Well mod_perl is not only useful to speed up the CGI scripts, but can be used to control the whole apache web server Wink

If you notice it, mod_perl is not offered from WHM, but you can compile it from /scripts/easyapache....On the ncurses screen coming up, just check the --> [ ] Perl Module (not required to run .cgi scripts to get your webserver mod_perl enabled.
Logged

Abhilash

JSA Supervisor - System Admin Team
The Natural Greek Phenomenon
Intergalactic Superstar
*****
Offline Offline

Posts: 144


WWW
« Reply #2 on: June 02, 2005, 05:56:54 AM »

Hello Abhilash,

I've gone thru ssh and run /scripts/easyapache
but don't know where from to check the --> [ ] module  Neutral

Also at upon installation I've been presented with 8 options:
1) Beginner without/phpsuexec + webroot protection support (*** DEFAULT ***)
2) Beginner with/phpsuexec support + web root protection
3) Beginner with/php mcrypt support (if php will not compile, you must choos
e option 1)
4) Beginner with/php gd+freetype support (if php will not compile, you must
choose option 1)
5) Beginner with/php gd+freetype+mcrypt support (if php will not compile, yo
u must choose option 1)
6) Advanced (Experts Only, At Your Own Risk)
7) Advanced [Load Previous Config] (Experts Only, At Your Own Risk)
Gleam Failsafe mode (Resets apache config to default, USE ONLY AS A LAST RESORT
)
Logged
abhilash
Intergalactic Cowboy
*****
Offline Offline

Posts: 61



« Reply #3 on: June 02, 2005, 12:40:48 PM »

Hello George,

I am really happy to see that you are trying to install it yourself. Before proceeding please take a backup of httpd.conf
(a command similar to --> " cp -af /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.mod.perl " will help)

Choose 7 Advanced (Experts Only (Load previous config), At Your Own Risk)

to see the screen as below,
Code:

[ ] Expires Module
 [*] Raise FD_SETSIZE to 16384 (System Wide)
 [*] Prevent Users from reading other webroots
 [*] Frontpage Module
 [ ] Gzip Module (experimental)
 [*] Raise HARD_SERVER_LIMIT
 [ ] Perl Module (not required to run .cgi scripts/not
 Php Module --->
 [ ] PHP suEXEC Support
 [*] Report Build Errors to cPanel
 [ ] Reset Apache Config to Default (last resort)
 [*] Rewrite Module
 [*] SSL Module
 [*] suEXEC Module


If the settings are like the above, choose [ ] Perl Module and select it with Space button. Once you have done that exit and save. You can relax while Cpanel do the rest.
Logged

Abhilash

JSA Supervisor - System Admin Team
The Natural Greek Phenomenon
Intergalactic Superstar
*****
Offline Offline

Posts: 144


WWW
« Reply #4 on: June 02, 2005, 02:25:12 PM »

Hello Abhilash,

I believe according to your instructions, if I followed every step correctly,
mod_perl is installed. If you please check it, if it is installed OK.

Yes, I am not savvy at all, but your tutorial is clear-cut and helped a lot.

Plus other webmasters will benefit too  Alien Abduction  from the tutelage.

Thanks a million!

Yours,
George
Logged
The Natural Greek Phenomenon
Intergalactic Superstar
*****
Offline Offline

Posts: 144


WWW
« Reply #5 on: June 02, 2005, 02:29:27 PM »

P.S. I ran a script showing server software and says "The library mod_perl is not installed" - perhaps I miss something.
Logged
abhilash
Intergalactic Cowboy
*****
Offline Offline

Posts: 61



« Reply #6 on: June 02, 2005, 10:17:14 PM »

Hello,

I have installed the mod_perl for you and confirmed that it is actually working.

Captured with live http header plugin

Code:

HTTP/1.x 200 OK
Date: Fri, 03 Jun 2005 04:56:31 GMT
Server: Apache/1.3.33 (Unix) mod_perl/1.29 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.11 FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.7a
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html


BTW when I was checking your server, apache was not running and throwing segmentation fault. I think you were aware of it, as the machine got rebooted, while I was on the server.

So I had to recompile the apache with mod_perl disabled (not sure that was the cause of segmentation fault) and instead of Cpanel's APACI way of compiling mod_perl, I used apxs.

I am pasting below the compilation..

Code:

[root@cpanel root]# cd /usr/src/
[root@cpanel src]# wget http://perl.apache.org/dist/mod_perl-1.29.tar.gz
--21:47:14--  http://perl.apache.org/dist/mod_perl-1.29.tar.gz
           => `mod_perl-1.29.tar.gz'
[root@cpanel src]# tar xvzf mod_perl-1.29.tar.gz
mod_perl-1.29
[root@cpanel src]# cd mod_perl-1.29
[root@cpanel mod_perl-1.29]# perl Makefile.PL USE_APXS=1 WITH_APXS=/usr/local/apache/bin/apxs EVERYTHING=1
[root@cpanel mod_perl-1.29]# make && make test
[root@cpanel mod_perl-1.29]# make install


Apxs way of module compilation has a major beneift that you don't have to recompile apache if you ever feel to disable the mod_perl module. For disabling mod_perl, open up httpd.conf and comment out the below lines and restarting the server.

LoadModule perl_module        libexec/libperl.so
AddModule mod_perl.c

I hope this helps..

Note: You can see the statically compiled modules when you execute " /usr/local/apache/bin/httpd -l "
Logged

Abhilash

JSA Supervisor - System Admin Team
The Natural Greek Phenomenon
Intergalactic Superstar
*****
Offline Offline

Posts: 144


WWW
« Reply #7 on: June 02, 2005, 10:34:05 PM »

Hi Abhilash,

Yes Apache was down for some reason and I gracefully rebooted the system;
via the WHM I saw a red button blinking and reflectionally I felt like rebooting.
I don't know what caused it but thank Lord it's OK now.

Great info. I feel great  Alien Abduction  for having such guidance and support.

Since the server relies on scripts and heavy loaded cgi programs,
I presume that mod_perl will do an amazing job here.

Grateful I am for you popping in the machine Abhilash and helping me out.

Power ON,
George
Logged
The Natural Greek Phenomenon
Intergalactic Superstar
*****
Offline Offline

Posts: 144


WWW
« Reply #8 on: June 03, 2005, 12:47:27 PM »

Abhilash - help!

Some critical scripts stopped working - it's probably mod_perl
causing it. These scripts now only work if renamed to "*.cgi"
which would bamboozle my project.

How do I open httpd.conf - don't know the command.

I believe that I cannot use mod_perl because of that.
If there's another solution for keeping mod_perl active, that's great
but I'd rather uninstall it if scripts break down!

Sorry for the trouble but I didn't think this would happen.

Yours,
George
Logged
The Natural Greek Phenomenon
Intergalactic Superstar
*****
Offline Offline

Posts: 144


WWW
« Reply #9 on: June 03, 2005, 01:12:37 PM »

UPDATE:
I just did pico /usr/local/apache/conf/httpd.conf
and commented out the
LoadModule perl_module libexec/libperl.so
AddModule mod_perl.c

then did...

service httpd restart

Still cgi scripts are not working
Logged
abhilash
Intergalactic Cowboy
*****
Offline Offline

Posts: 61



« Reply #10 on: June 03, 2005, 01:27:27 PM »

Please mention the scritps here or can you please open up a ticket to dedicated@lunarpages.com mentioning the scripts also, so that we can have a look into it.
Logged

Abhilash

JSA Supervisor - System Admin Team
The Natural Greek Phenomenon
Intergalactic Superstar
*****
Offline Offline

Posts: 144


WWW
« Reply #11 on: June 03, 2005, 07:18:56 PM »

Hello Abhilash,

Problem solved by Steve at the tech support.
The .htaccess files were affected as they got renamed.
According to Steve the mod_perl might not be the case here.

Now, should I comment again the:
LoadModule perl_module libexec/libperl.so
AddModule mod_perl.c

save and...

and do a "service httpd restart" again.

Thank you,
George
Logged
The Natural Greek Phenomenon
Intergalactic Superstar
*****
Offline Offline

Posts: 144


WWW
« Reply #12 on: June 03, 2005, 07:20:28 PM »

Abhilash!
Applause thanks for the FREE 2 GB FTP backup space - just got your email.
Logged
abhilash
Intergalactic Cowboy
*****
Offline Offline

Posts: 61



« Reply #13 on: June 04, 2005, 08:02:31 PM »

Hi George,

As I mentioned it was not the mod_perl which was causing the issue. .htaccess files were needed to parse the .html files as .shtml and those .html pages was read  as html pages itself and hence the pages were blank. You either have to mention it in httpd.conf (server wide) or in. htaccess (account specific).

And also you dont have to comment out the mod_perl lines unless you experience any issues. We can compile it with httpd binary later (not as a module) if everything goes well.

Also make sure you take frequent backups.
Logged

Abhilash

JSA Supervisor - System Admin Team
The Natural Greek Phenomenon
Intergalactic Superstar
*****
Offline Offline

Posts: 144


WWW
« Reply #14 on: June 04, 2005, 08:23:43 PM »

Hi Abhilash,

Thanks for popping in on Sunday.

Ok with httpd.
I had problems with subdomains losing their redirection I had set-up and had to manually re-enter them one by one. Perhaps it was a DNS problem,I don't know.

It's such a relief going thru server issues with your expertise as I would never done it myself. My brain's CPU is overloaded and have to get some sleep in a while as we speak. I'm sporadically checking the forum for tutorial.

See you,
George
Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to: