essjay_d12 Posted January 26, 2007 Share Posted January 26, 2007 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 againif 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 wrongcheersd Quote Link to comment Share on other sites More sharing options...
trq Posted January 27, 2007 Share Posted January 27, 2007 You have the same address (pcol-koha.pembrokeshire.ac.uk) pointing to two different virtual hosts, this will never work. Quote Link to comment Share on other sites More sharing options...
essjay_d12 Posted January 27, 2007 Author Share Posted January 27, 2007 thats what the installation says - isnt it ok because one is 80 and the other 8080? one virtual host is just the admin side of the other virtual host Quote Link to comment Share on other sites More sharing options...
trq Posted January 28, 2007 Share Posted January 28, 2007 Sorry, didn't even notice that.What error messages are you getting? Quote Link to comment Share on other sites More sharing options...
andrewholway Posted January 28, 2007 Share Posted January 28, 2007 [url=http://www.debian-administration.org/articles/412]http://www.debian-administration.org/articles/412[/url]This howto is good for setting up virtual hosts. Quote Link to comment Share on other sites More sharing options...
essjay_d12 Posted January 28, 2007 Author Share Posted January 28, 2007 im not getting any error messages, but when i try to restart apache - it wont! it just says .... stopping [ok] start apache [failed]. if i remove my virtual hosts apache starts [ok] Quote Link to comment Share on other sites More sharing options...
irken Posted January 28, 2007 Share Posted January 28, 2007 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:ServerAdminDocumentRootServerNameScriptAliasDoes that work at all? If it does, start by appending each of your other lines until it errors. Quote Link to comment Share on other sites More sharing options...
trq Posted January 28, 2007 Share Posted January 28, 2007 [quote]im not getting any error messages[/quote]Did you check the error logs? Quote Link to comment Share on other sites More sharing options...
essjay_d12 Posted January 29, 2007 Author Share Posted January 29, 2007 how do you check the error logs? Quote Link to comment Share on other sites More sharing options...
trq Posted January 29, 2007 Share Posted January 29, 2007 On my machine Id'e use....[code]tail -50 /var/log/apache2/error_log[/code]This will show the last 50 lines. Quote Link to comment Share on other sites More sharing options...
essjay_d12 Posted January 29, 2007 Author Share Posted January 29, 2007 there is no apache2 folder in my log folder! Quote Link to comment Share on other sites More sharing options...
essjay_d12 Posted January 29, 2007 Author Share Posted January 29, 2007 I now get to a page where it says Internal Server Errorthe server encountered an internal error or misconfiguration snd was unable to complete your request. Quote Link to comment Share on other sites More sharing options...
trq Posted January 29, 2007 Share Posted January 29, 2007 Have a look in your /var/log directory for an appropriate error log, without an error message we can't help much. Quote Link to comment Share on other sites More sharing options...
essjay_d12 Posted January 29, 2007 Author Share Posted January 29, 2007 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] Quote Link to comment Share on other sites More sharing options...
essjay_d12 Posted January 29, 2007 Author Share Posted January 29, 2007 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.plCan'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?? Quote Link to comment Share on other sites More sharing options...
andrewholway Posted January 30, 2007 Share Posted January 30, 2007 [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 privilagesWhich user are you running root from?you could try running it as root. . . . That might fix it. Quote Link to comment Share on other sites More sharing options...
essjay_d12 Posted January 31, 2007 Author Share Posted January 31, 2007 I am logged in as root! and still its saying the same thing! Quote Link to comment Share on other sites More sharing options...
andrewholway Posted January 31, 2007 Share Posted January 31, 2007 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 Quote Link to comment Share on other sites More sharing options...
essjay_d12 Posted January 31, 2007 Author Share Posted January 31, 2007 is there a basic way in which i can test a perl file rather than a php one? Quote Link to comment Share on other sites More sharing options...
essjay_d12 Posted January 31, 2007 Author Share Posted January 31, 2007 I have created a world.pl file [code]#!perl /usr/bin/perlprint 'hello world';[/code]This was put in the main cgi-bin file /var/www/cgi-bin/and again there was a internal server error - permission deniedso my apache config isnt correct Quote Link to comment Share on other sites More sharing options...
andrewholway Posted January 31, 2007 Share Posted January 31, 2007 can you try somthing even more simple, not using cgi at all. Just a text file or somthing Quote Link to comment Share on other sites More sharing options...
andrewholway Posted January 31, 2007 Share Posted January 31, 2007 I may be wrong but it seems your getting the error whilst your starting apache. This is before you even start serving files with it. Just the most basic setup possible. Then, if that works you can build on top of that.Andy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.