Apache 2.2 on ubuntu server 10.10 [LAN only, no WAN] all running well, except that virtualhosts is not functional as expected. All other LAN boxes are Win XP Pro SP2 and can see the ubuntu server2 (hard coded IPs for LAN, no DHCP.) 192.168.0.20 is NameVirtualHost on the ubuntu server2.

Set up 4 websites (sdb/www/site1, sdb/www/site2, etc, not using public_html) and the corresponding entries in hosts and sites-enabled - all accessible from Firefox on server2. HOWEVER, from the XP boxes on the LAN they were not directly visible using http://site1 (they were visible for a request http://server2/site1 but this was bypassing virtualhosts and going straight to the directory - proved it by adding a fully functional site5 with no corresponding VirtualHost in sites-enabled). After modifying the Win hosts file to add lines 192.168.0.20 site1, 192.168.0.20 site2, etc all functioned as expected but is probably still finding the directory rather than the VirtualHost.

This to me appears to be Win forcing the address at http request level, rather than apache resolving via virtualhosts. Am I correct? and if so how do I get apache to resolve correctly? or conversely is there an http request (similar to ~site1 using public_html) that should be used.

The reason for this request is that I am trying to differentiate between two "entries to a single app on different ports (koha on 80 and koha.admin on 8080) and cannot get it to work. Snipped version of VirtualHost file in sites-enabled as follows:

# Koha Apache Configuration Directives

# NameVirtualHost 192.168.0.20:80 - see ports.conf
NameVirtualHost 127.0.0.1:80

## OPAC
<VirtualHost 127.0.0.1:80 192.168.0.20:80>
   ServerAdmin  webmas...@server2
   DocumentRoot /usr/share/koha/opac/htdocs
   ServerName koha
   ServerAlias *.koha
   ScriptAlias /cgi-bin/koha/ "/usr/share/koha/opac/cgi-bin/opac/"
   ScriptAlias /index.html "/usr/share/koha/opac/cgi-bin/opac/opac-main.pl"
   ScriptAlias /opac-search.pl "/usr/share/koha/opac/cgi-bin/opac/search"
   ScriptAlias /search "/usr/share/koha/opac/cgi-bin/opac/search"
   ErrorLog /var/log/koha/koha-opac-error_log
   SetEnv KOHA_CONF "/etc/koha/koha-conf.xml"
   SetEnv PERL5LIB "/usr/share/koha/lib"
</VirtualHost>

NameVirtualHost 192.168.0.20:8080

<VirtualHost 127.0.0.1:8080 192.168.0.20:8080>
   ServerAdmin webmas...@server2
   DocumentRoot /usr/share/koha/intranet/htdocs
   ServerName server2:8080
   ServerAlias koha.admin:8080 koha.admin http://koha.admin
   ScriptAlias /cgi-bin/koha/ "/usr/share/koha/intranet/cgi-bin/"
   ScriptAlias /index.html "/usr/share/koha/intranet/cgi-bin/mainpage.pl"
   ScriptAlias /search "/usr/share/koha/intranet/cgi-bin/search.pl"
   ErrorLog /var/log/koha/koha-error_log
   SetEnv KOHA_CONF "/etc/koha/koha-conf.xml"
   SetEnv PERL5LIB "/usr/share/koha/lib"
</VirtualHost>

The server aliases in the second VirtualHost do not work.

Many thanks - Paul
[first post to this list]


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to