[Koha] Solved: Re: Koha virtualhost on apache2 (openSUSE 11.2) Issue

Tomas Cohen Arazi tomascohen at gmail.com
Sat May 22 01:03:59 NZST 2010


> -----Original Message-----
> From: koha-bounces at lists.katipo.co.nz [mailto:koha-bounces at lists.katipo.co.nz] On Behalf Of Andi Sugandi
> Sent: Thursday, May 20, 2010 7:07 AM
> To: Suyadi
> Cc: koha
> Subject: [Koha] Solved: Re: Koha virtualhost on apache2 (openSUSE 11.2) Issue
>
> On 5/19/10, Suyadi <abufarros at gmail.com> wrote:
>
>> I was glad to have friends from Indonesia who use koha.
>> We also have using koha since 2008.
>> This is our OPAC : http://search.lib.ums.ac.id
>
> Yes, I knew about it, you have implemented Koha deeper and longer than
> ours as there were no technical person who in charge about our Koha
> here, even though it's been running from December 2008 (installed by
> internal staff of this museum with does not have enough technical
> background).
>
> I'm helping this museum voluntarily starting this month.
>
> I'm glad too to have a friend that come form same country using Koha.. =)
>
>> Does the configuration files for phpmyadmin still exists in the directory
>> /etc/apache2/vhost.d/ ?
>> If there is any possible conflict with the other configuration (usually if
>> there are two or more virtualhost that uses the same port then reads the
>> earliest used).
>
> It definately yes.
>
> I unfortunately  did not recognize that Koha took over "ipaddress:80"
> to /usr/share/koha/opac/htdocs (rewrite module, in
> /etc/apache2/vhosts.d/ip-based_vhosts.conf
> /etc/apache2/vhosts.d/koha-httpd.conf configuration file ) so every
> url (ipaddress:80) would be based on that path.
>
> I also remembered that I installed Koha in /usr/share directory, (not
> other directory) because I have other web-based applications in the
> server.
>
> And then I could not access my ipaddress:80/phpMyAdmin (because
> phpMyAdmin is not in /usr/share/koha/opac/htdocs directory) .
>
> The (temporary) work-arround is to change the default port (80) of the
> OPAC-Koha Sever to another port-number, so I can access other
> web-based application in the server through default apache-port
> number.
>
> Is it known issue?
>
> Apology, Is it bug or not?

The problem seems to be that your install is using IP based virtual hosts.[0]
This means your server needs a different IP address for each site:
when a tcp connection is established to a specific port, then your
apache serves an specific site.
Another approach is using Name-based virtual hosts. In this setup you
have your apache listening on any port (e.g. 80) and when the browser
asks for a page, it extracts the fully qualified domain name (fqdn)
from the request and searches (using pattern matching) for the
appropriate VirtualHost whose ServerName (or ServerAlias) sentence
matches the fqdn of the request.[1]

That said, there's another option to keep in mind: in every
VirtualHost you can insert an Alias definition [2]. Using it you can
insert an alias definition like this in your koha's virtualhost
section:

Alias /phpMyAdmin "/path/to/phpmyadmin/in/filesystem"
<Directory "/path/to/phpmyadmin/in/filesystem">
       ...
</Directory>

which will be evaluated using pattern matching too. As you can see, it
doesn't matter it is not in koha's root.


Well, I hope I didn't confuse things more.
To+


[0] http://httpd.apache.org/docs/2.0/vhosts/ip-based.html
[1] http://httpd.apache.org/docs/2.0/vhosts/name-based.html
[2] http://httpd.apache.org/docs/2.0/mod/mod_alias.html#alias


More information about the Koha mailing list