Aller au contenu

Apache

Installer Apache

$ sudo eopkg install httpd
$ which apachectl
/usr/sbin/apachectl

Fichiers de configuration (par défaut):

/usr/share/defaults/httpd/httpd.conf
/usr/share/defaults/httpd/extra/httpd-vhosts.conf
/usr/share/defaults/httpd/extra/httpd-ssl.conf

Fichiers de configuration (personnel):

Créer le répertoire /etc/httpd/conf.d/ puis y mettre ses propres *.conf

/etc/httpd/conf.d/httpd.conf
/etc/httpd/conf.d/httpd-vhosts.conf

User: httpd Group: httpd DocumentRoot (par défaut): /var/www/

Fichiers log:

/var/log/httpd/access_log
/var/log/httpd/error_log

Exécuter Apache:

$ sudo systemctl enable httpd   # Enable on startup

$ sudo systemctl start httpd    # Start the web server
$ sudo systemctl stop httpd     # Stop the web server

Le service httpd a-t'il été activé au boot?

$ systemctl is-enabled httpd
enabled

Le service httpd est-il actif ?

$ systemctl is-active httpd
active

Status du service httpd:

$ systemctl status httpd
● httpd.service - Apache Web Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor prese>
   Active: active (running) since Sun 2019-05-12 20:11:41 CEST; 26min ago
 Main PID: 776 (httpd)
    Tasks: 82 (limit: 4915)
   Memory: 10.6M
   CGroup: /system.slice/httpd.service
           ├─776 /usr/sbin/httpd -k start -DFOREGROUND
           ├─833 /usr/sbin/httpd -k start -DFOREGROUND
           ├─834 /usr/sbin/httpd -k start -DFOREGROUND
           └─837 /usr/sbin/httpd -k start -DFOREGROUND

Dernière mise à jour: May 7, 2020