Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Feb 2018 11:44:04 -0500
From:      "James B. Byrne" <byrnejb@harte-lyne.ca>
To:        freebsd-questions@freebsd.org
Subject:   Apache 2.4 
Message-ID:  <0ff8c58ea6d2aa3454f1a4661e79ecd7.squirrel@webmail.harte-lyne.ca>

next in thread | raw e-mail | index | archive | help
I have Apache24 configured to load a virtual host. Viz:

<VirtualHost 192.168.216.107:80>

  ServerName    hll107.hamilton.harte-lyne.ca
  DocumentRoot  /usr/local/www/apache24/data/hll_dav/upload
  LogLevel      debug

  ErrorLog      /var/log/httpd/apache24/webdav/webdav_error.x.log
  TransferLog   /var/log/httpd/apache24/webdav/webdav_access.x.log

# For Testing without ssl
# This traps anyone under the actual file-system root
# Just in case.
  <Directory />
    Order allow,deny
    allow from all

    Options               Indexes MultiViews
    IndexOptions          FancyIndexing
    AddDefaultCharset     UTF-8

    AuthType              Basic
    AuthBasicProvider     file
    AuthName              ca.harte-lyne
    AuthUserFile          /usr/local/etc/apache24/access.d/.htpasswd

    Require               valid-user

# mod_dav_fs
    Dav On
    # No Sever Minimum Timeout on locks - let WebDaV clients decide
    DAVMinTimeout         0
    DAVDepthInfinity      Off
    LimitXMLRequestBody   96000000

  </Directory>
</VirtualHost>



In httpd.conf I have these statements:


ServerName    hll108.hamilton.harte-lyne.ca:80
Listen        192.168.216.108:80

ErrorLog      /var/log/httpd/apache24/httpd-error.log
LogLevel      debug

<Directory />
    AllowOverride none
    Require all denied
</Directory>

DocumentRoot "/usr/local/www/apache24/data"

<Directory "/usr/local/www/apache24/data">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

ErrorLog /var/log/httpd/apache24/httpd-error.log
LogLevel debug

CustomLog /var/log/httpd/apache24/httpd-access.log "common"

include etc/apache24/virtual.d/*.conf.x


Now the problems:

1. When I restart apache24 and do a netstat I do not see the virtual
host ip bound to port 80:

netstat -an | grep -i list
netstat: kvm not available: /dev/mem: No such file or directory
tcp4       0      0 192.168.216.108.80     *.*                    LISTEN
tcp4       0      0 127.0.107.1.25         *.*                    LISTEN
tcp4       0      0 192.168.216.107.22     *.*                    LISTEN
tcp4       0      0 127.0.107.1.53         *.*                    LISTEN


2. When I attempt to connect to the virtual host ipv4 address
192.168.216.107 I get this instead of a directory listing:

fetch -o - http://192.168.216.107
-                                               0% of   45  B    0 
Bps<html><body><h1>It works!</h1></body></html>
-                                             100% of   45  B  293
kBps 00m00s

And in the logs I see this


ll
-rw-r--r--  1 root  wheel  0 Feb  9 11:07 httpd-access.log
-rw-r--r--  1 root  wheel  0 Feb  9 11:07 webdav_access.x.log
-rw-r--r--  1 root  wheel  0 Feb  9 11:07 webdav_error.x.log

There are no entries made at all.

What is going on?  I do not care that I get the default site content
for the main host but why is the virtual host being redirected there
as well.  And where is the listener for 192.168.216.107:80?  Why do I
not see that in Netstat?


-- 
***          e-Mail is NOT a SECURE channel          ***
        Do NOT transmit sensitive data via e-Mail
 Do NOT open attachments nor follow links sent by e-Mail

James B. Byrne                mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0ff8c58ea6d2aa3454f1a4661e79ecd7.squirrel>