Heim  >  Artikel  >  Betrieb und Instandhaltung  >  Was ist der Standardinstallationspfad von Apache im Linux-System?

Was ist der Standardinstallationspfad von Apache im Linux-System?

王林
王林nach vorne
2020-11-05 16:29:563911Durchsuche

Was ist der Standardinstallationspfad von Apache im Linux-System?

Wenn Sie zur Installation das RPM-Paket verwenden, sollte sich der Installationspfad im Verzeichnis /etc/httpd befinden.

(Lernprogramm empfohlen: Apache)

Apache-Konfigurationsdatei: /etc/httpd/conf/httpd.conf Sie können den relevanten Zugriffspfad und die Konfiguration ändern.

Apache-Modulpfad: /usr/sbin/apachectl Starten Sie die Modul

Webverzeichnis: /var/www/html Projektspeicherpfad

Wenn Sie zur Installation Quellcode verwenden, wird dieser im Allgemeinen standardmäßig im Verzeichnis /usr/local/apache2 installiert.

Wenn Sie beim Starten von Apache eine Fehlermeldung erhalten, müssen Sie prüfen, ob der Port belegt ist, da Apache standardmäßig auf Port 80 startet. Beispielsweise öffnet die Standardseite von Nginx Port 80.

Die Fehlermeldung lautet wie folgt:

[root@localhost ~]# service httpd restart
Redirecting to /bin/systemctl restart httpd.service
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root@localhost ~]# service httpd status
Redirecting to /bin/systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since 三 2018-12-05 14:42:42 CST; 11s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 3640 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 3639 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 3639 (code=exited, status=1/FAILURE)

12月 05 14:42:42 localhost.localdomain httpd[3639]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
12月 05 14:42:42 localhost.localdomain httpd[3639]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
12月 05 14:42:42 localhost.localdomain httpd[3639]: no listening sockets available, shutting down
12月 05 14:42:42 localhost.localdomain httpd[3639]: AH00015: Unable to open logs
12月 05 14:42:42 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
12月 05 14:42:42 localhost.localdomain kill[3640]: kill: cannot find process ""
12月 05 14:42:42 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
12月 05 14:42:42 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
12月 05 14:42:42 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
12月 05 14:42:42 localhost.localdomain systemd[1]: httpd.service failed.
[root@localhost ~]#

Sie können den Fehler „Adresse bereits verwendet“ sehen und den Apache-Port ändern.

Bearbeiten Sie /etc/httpd/conf/httpd.conf

Was ist der Standardinstallationspfad von Apache im Linux-System?

Neu starten.

Das obige ist der detaillierte Inhalt vonWas ist der Standardinstallationspfad von Apache im Linux-System?. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!

Stellungnahme:
Dieser Artikel ist reproduziert unter:csdn.net. Bei Verstößen wenden Sie sich bitte an admin@php.cn löschen