LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 11-12-2009, 06:07 AM   #1
jswetzen
LQ Newbie
 
Registered: Nov 2009
Distribution: Ubuntu
Posts: 4

Rep: Reputation: 0
Apache refuses to start using PerlModule and virtual host


Hi,
I'm trying to install two instances of OCS Inventory on the same machine using virtual hosts in apache.
The apache configuration for it is in it's own file and it works fine without any virtual host. If I add it apache refuses to start without giving any error message. I narrowed it down to some lines loading perl modules, and if I comment them away apache will start again. Some of the modules work, but some of the ones specific to OCS Inventory will not work.

I can't understand what the difference is between loading it in a virtual host or not, it doesn't make any sense to me! Does anyone have a clue?

Thanks

I'm using apache 2.2.3, perl 5.8.8 and CentOS 5.4
 
Old 11-12-2009, 06:35 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by jswetzen View Post
Hi,
I'm trying to install two instances of OCS Inventory on the same machine using virtual hosts in apache.
The apache configuration for it is in it's own file and it works fine without any virtual host. If I add it apache refuses to start without giving any error message. I narrowed it down to some lines loading perl modules, and if I comment them away apache will start again. Some of the modules work, but some of the ones specific to OCS Inventory will not work.

I can't understand what the difference is between loading it in a virtual host or not, it doesn't make any sense to me! Does anyone have a clue?

Thanks

I'm using apache 2.2.3, perl 5.8.8 and CentOS 5.4
is there any output from

Code:
apachectl configtest
 
Old 11-12-2009, 06:49 AM   #3
jswetzen
LQ Newbie
 
Registered: Nov 2009
Distribution: Ubuntu
Posts: 4

Original Poster
Rep: Reputation: 0
'apachectl configtest' gives me "Syntax OK".

I just found that my apache error log complains about OCS_MODPERL_VERSION not being set:
Code:
[Tue Nov 10 00:45:31 2009] [error] OCS_MODPERL_VERSION not defined. Abort\nBEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/Apache/Ocsinventory.pm line 28.\nCompilation failed in require at (eval 8) line 3.\n
Earlier on in the config is the line

PerlSetEnv OCS_MODPERL_VERSION 2

so it should really be set...

EDIT: Putting that line before the virtualhost definition allowed apache to start, but The Ocsinventory module is complaining about other variables not being set (which are set within virtualhost). I could put them all in the beginning, but the different virtualhosts need different configurations so I'm not sure it it would work well.

Last edited by jswetzen; 11-12-2009 at 07:54 AM.
 
  


Reply

Tags
apache, modperl, perl, virtualhost


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
apache and virtual host voip_tech_2004 Red Hat 1 04-12-2006 12:36 PM
Apache - Name virtual host tisource Linux - Networking 5 03-03-2006 03:52 AM
apache refuses to start after hostname change Mux Linux - Software 3 02-01-2004 02:13 AM
Virtual host and apache Samspeed Linux - General 8 08-06-2003 08:41 AM
apache virtual host mimi Linux - General 1 04-06-2002 06:11 AM


All times are GMT -5. The time now is 03:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration