Jump to content

Apache won't start with my included VirtualHost


essjay_d12

Recommended Posts

Hi I am trying to include a virtual host which is needed for the runnign of Koha.

in my httpd.conf file i have included the code....

[code]Include /etc/koha-httpd.conf[/code]

and the koha-httpd.conf file looks like this....

[code]
Listen 8080
<VirtualHost 212.219.110.198:80>
    ServerAdmin admin@p.ac.uk
    DocumentRoot /usr/local/koha/opac/htdocs
    ServerName pcol-koha.pembrokeshire.ac.uk
    ScriptAlias /cgi-bin/koha/ /usr/local/koha/opac/cgi-bin/
    Redirect permanent index.html http://pcol-koha.pembrokeshire.ac.uk:80/cgi-bin/koha/opac-main.pl
    ErrorLog /usr/local/koha/log/opac-error_log
    TransferLog /usr/local/koha/log/opac-access_log
    SetEnv PERL5LIB "/usr/local/koha/intranet/modules"
    SetEnv KOHA_CONF "/etc/koha.conf"
</VirtualHost>

<VirtualHost 212.219.110.198:8080>
    ServerAdmin admin@p.ac.uk
    DocumentRoot /usr/local/koha/intranet/htdocs
    ServerName pcol-koha.pembrokeshire.ac.uk
    ScriptAlias /cgi-bin/koha/ /usr/local/koha/intranet/cgi-bin/
    Redirect permanent index.html http://pcol-koha.pembrokeshire.ac.uk:80/cgi-bin/koha/mainpage.pl
    ErrorLog /usr/local/koha/log/koha-error_log
    TransferLog /usr/local/koha/log/koha-access_log
    SetEnv PERL5LIB "/usr/local/koha/intranet/modules"
    SetEnv KOHA_CONF "/etc/koha.conf"
</VirtualHost>
[/code]

Soon ass I add these lines and restart apache it fails to start up again

if i take them out it starts fine!

anyone know why this is, im told in installation to add these into the file.... but cant see whats wrong

cheers

d
Link to comment
Share on other sites

One idea would be to comment out everything that's not needed for the vhost to run. You don't need to specifiy error logs for example. Comment all that out, write only things like:

ServerAdmin
DocumentRoot
ServerName
ScriptAlias

Does that work at all? If it does, start by appending each of your other lines until it errors.
Link to comment
Share on other sites

here is the error log when i loaded the site at 10.33

[code][Mon Jan 29 10:33:30 2007] [error] [client 212.219.110.198] (13)Permission denied: exec of '/usr/local/koha/intranet/cgi-bin/mainpage.pl' failed
[Mon Jan 29 10:33:30 2007] [error] [client 212.219.110.198] Premature end of script headers: mainpage.pl
[Mon Jan 29 10:33:30 2007] [error] [client 212.219.110.198] File does not exist: /usr/local/koha/intranet/htdocs/favicon.ico
[Mon Jan 29 10:33:30 2007] [error] [client 212.219.110.198] File does not exist: /usr/local/koha/intranet/htdocs/favicon.ico[/code]
Link to comment
Share on other sites

I ran the script in the shell (searching on google suggested this to get a better idea of the problem.....) and this is the result i got....

[code]
PERL5LIb=/usr/local/koha/intranet/modules perl /usr/local/ko ha/intranet/cgi-bin/mainpage.pl
Can't locate C4/Database.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8 .6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-mult i /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/site_per l/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/si te_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr /lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /u sr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_per l/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thre ad-multi /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/ lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vend or_perl /usr/lib/perl5/5.8.6/i386-linux-thread-multi /usr/lib/perl5/5.8.6 .) at /usr/local/koha/intranet/cgi-bin/mainpage.pl line 5.
BEGIN failed--compilation aborted at /usr/local/koha/intranet/cgi-bin/mainpage.p l line 5.
[/code]

Any one with any solutions??
Link to comment
Share on other sites

[code][Mon Jan 29 10:33:30 2007] [error] [client 212.219.110.198] (13)Permission denied: exec of '/usr/local/koha/intranet/cgi-bin/mainpage.pl' failed[/code]

That sorta suggests your not running apache with the appropriate privilages

Which user are you running root from?

you could try running it as root. . . . That might fix it.

Link to comment
Share on other sites

start from scratch, set up a sample page with <?php phpinfo() ?> in it or somthing. This should tell you if apache is working okay. then we can work out getting the multiple virtual servers working. You could try installing webmin, this made everything a lot easier for me.

Andy
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.