Table des matières

Apache


Services Réseaux

Wiki Apache

pkgin install apache
calculating dependencies...done.
 
1 package to install:
  apache-2.4.39nb2
 
0 to refresh, 0 to upgrade, 1 to install
0B to download, 27M to install
 
proceed ? [Y/n] Y
installing apache-2.4.39nb2...
apache-2.4.39nb2: copying /usr/pkg/share/examples/httpd/extra/httpd-autoindex.conf to /usr/pkg/etc/httpd/httpd-autoindex.conf
apache-2.4.39nb2: copying /usr/pkg/share/examples/httpd/extra/httpd-dav.conf to /usr/pkg/etc/httpd/httpd-dav.conf
apache-2.4.39nb2: copying /usr/pkg/share/examples/httpd/extra/httpd-default.conf to /usr/pkg/etc/httpd/httpd-default.conf
apache-2.4.39nb2: copying /usr/pkg/share/examples/httpd/extra/httpd-info.conf to /usr/pkg/etc/httpd/httpd-info.conf
apache-2.4.39nb2: copying /usr/pkg/share/examples/httpd/extra/httpd-languages.conf to /usr/pkg/etc/httpd/httpd-languages.conf
apache-2.4.39nb2: copying /usr/pkg/share/examples/httpd/extra/httpd-manual.conf to /usr/pkg/etc/httpd/httpd-manual.conf
apache-2.4.39nb2: copying /usr/pkg/share/examples/httpd/extra/httpd-mpm.conf to /usr/pkg/etc/httpd/httpd-mpm.conf
apache-2.4.39nb2: copying /usr/pkg/share/examples/httpd/extra/httpd-multilang-errordoc.conf to /usr/pkg/etc/httpd/httpd-multilang-errordoc.conf
apache-2.4.39nb2: copying /usr/pkg/share/examples/httpd/extra/httpd-ssl.conf to /usr/pkg/etc/httpd/httpd-ssl.conf
apache-2.4.39nb2: copying /usr/pkg/share/examples/httpd/extra/httpd-userdir.conf to /usr/pkg/etc/httpd/httpd-userdir.conf
apache-2.4.39nb2: copying /usr/pkg/share/examples/httpd/extra/httpd-vhosts.conf to /usr/pkg/etc/httpd/httpd-vhosts.conf
apache-2.4.39nb2: copying /usr/pkg/share/examples/httpd/httpd.conf to /usr/pkg/etc/httpd/httpd.conf
apache-2.4.39nb2: copying /usr/pkg/share/examples/httpd/magic to /usr/pkg/etc/httpd/magic
apache-2.4.39nb2: copying /usr/pkg/share/examples/httpd/mime.types to /usr/pkg/etc/httpd/mime.types
===========================================================================
The following files should be created for apache-2.4.39nb2:
 
        /etc/rc.d/apache (m=0755)
            [/usr/pkg/share/examples/rc.d/apache]
 
===========================================================================
===========================================================================
$NetBSD: MESSAGE,v 1.2 2014/02/22 17:28:34 ryoon Exp $
 
After apache-2.4.3, --enable-mpms-shared='event worker prefork' is
passed to configure script, then these multi-process model is built
and you can select the model in configuraton file.
 
The mod_cgi.so module conflicts with non-prefork multi-process model,
and mod_cgi.so module is not built anymore.
You can use mod_cgid.so module instead.
===========================================================================
pkg_install warnings: 1, errors: 0
pkg_install error log can be found in /var/db/pkgin/pkg_install-err.log
reading local summary...
processing local summary...
marking apache-2.4.39nb2 as non auto-removable

Fichiers de configuration

/usr/pkg/etc/httpd/httpd.conf

Hébergements des pages par défaut

/usr/pkg/share/httpd/htdocs/

Copie du deamon apache

cp /usr/pkg/share/examples/rc.d/apache /etc/rc.d/

Modification des droits

chmod 0755 /etc/rc.d/apache

Modification de /etc/rc.conf

vi /etc/rc.conf
apache=YES
OU
echo apache=YES >> /etc/rc.conf

Vérification de la version

httpd -v
Server version: Apache/2.4.39 (Unix)
Server built:   Jul  2 2019 10:42:27

Exécution de apache

/etc/rc.d/apache start
Starting apache.

It works! ;-)



Services Réseaux