Apache 2.4

Vladimir Botka vbotka at gmail.com
Fri Feb 9 17:17:09 UTC 2018


Hi James,

On Fri, 9 Feb 2018 11:44:04 -0500
"James B. Byrne via freebsd-questions"
<freebsd-questions at freebsd.org> wrote:

> I have Apache24 configured to load a virtual host. Viz:
> <VirtualHost 192.168.216.107:80>
> 
>   ServerName    hll107.hamilton.harte-lyne.ca
> [...]
> 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

FWIW. Apache24 with virtual hosts (no DAV) installed with my
Ansible role works for me. https://galaxy.ansible.com/vbotka/apache/
---------------------------------------------------------------------------
tcp4       0      0 *.80                   *.*                    LISTEN
tcp6       0      0 *.80                   *.*                    LISTEN
tcp4       0      0 *.443                  *.*                    LISTEN
tcp6       0      0 *.443                  *.*                    LISTEN
---------------------------------------------------------------------------

Here is the examples of a created file with virtual host. (By default http is
redirecred to https.)

# cat /usr/local/etc/apache24/extra/example.net.conf
<VirtualHost *:80>
ServerName example.net
DocumentRoot /usr/local/www/apache24/data/example.net/
Redirect permanent / https://example.net/
</VirtualHost>

<VirtualHost *:443>
ServerName example.net
DocumentRoot /usr/local/www/apache24/data/example.net/
SSLCertificateFile /usr/local/etc/letsencrypt/live/example.net/fullchain.pem
SSLCertificateKeyFile /usr/local/etc/letsencrypt/live/example.net/privkey.pem
</VirtualHost>

HTH, Cheers,

	-vlado
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20180209/ba48117a/attachment.sig>


More information about the freebsd-questions mailing list