带有Web界面的Pi Hole和同一Raspberry Pi 4上的wordpress

问题描述 投票:0回答:1

在我的树莓派通过网络int运行pi孔中,我还想安装带有本地ip的wordpress网站,但是当我尝试安装组件apache时,无法在安装结束时启动服务器。如何在同一RPi的本地创建带有pi孔的pvt网站?谢谢。ps下面的错误代码,如果可能是有用的:)

pi@PotatoServer:~ $ sudo apt install apache2 -y
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze
Lettura informazioni sullo stato... Fatto
I seguenti pacchetti sono stati installati automaticamente e non sono più richiesti:
  alsa-base gstreamer0.10-alsa gstreamer0.10-plugins-base liba52-0.7.4
  libaribb24-0 libbasicusageenvironment1 libcddb2 libdav1d3 libdvbpsi10
  libebml4v5 libgroupsock8 libgstreamer-plugins-base0.10-0 libgstreamer0.10-0
  libixml10 liblirc-client0 liblivemedia64 libllvm8 libmatroska6v5
  libmicrodns0 libmpeg2-4 libopenmpt-modplug1 libplacebo7 libprotobuf-lite17
  libproxy-tools libresid-builder0c2a libsidplay2 libspatialaudio0
  libspeexdsp1 libupnp13 libusageenvironment3 libvlc-bin libvlc5 libvlccore9
  libxcb-xv0 libxfce4util-bin libxfce4util-common libxfce4util7 libxfconf-0-2
  pimixer point-rpi vlc-bin vlc-data vlc-l10n vlc-plugin-notify vlc-plugin-qt
  vlc-plugin-samba vlc-plugin-skins2 vlc-plugin-video-output
  vlc-plugin-video-splitter vlc-plugin-visualization xfconf
Usare "sudo apt autoremove" per rimuoverli.
Pacchetti suggeriti:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom
I seguenti pacchetti NUOVI saranno installati:
  apache2
0 aggiornati, 1 installati, 0 da rimuovere e 0 non aggiornati.
È necessario scaricare 0 B/251 kB di archivi.
Dopo quest'operazione, verranno occupati 613 kB di spazio su disco.
Selezionato il pacchetto apache2 non precedentemente selezionato.
(Lettura del database... 159463 file e directory attualmente installati.)
Preparativi per estrarre .../apache2_2.4.38-3+deb10u3_armhf.deb...
Estrazione di apache2 (2.4.38-3+deb10u3)...
Configurazione di apache2 (2.4.38-3+deb10u3)...
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling module reqtimeout.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /lib/systemd/system/apache-htcacheclean.service.
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
invoke-rc.d: initscript apache2, action "start" failed.
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset:enabled)
   Active: failed (Result: exit-code) since Mon 2020-03-09 02:08:51 CET; 22ms ago
     Docs: https://httpd.apache.org/docs/2.4/
  Process: 637 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

mar 09 02:08:51 PotatoServer apachectl[637]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
mar 09 02:08:51 PotatoServer apachectl[637]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
mar 09 02:08:51 PotatoServer apachectl[637]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
mar 09 02:08:51 PotatoServer apachectl[637]: no listening sockets available, shutting down
mar 09 02:08:51 PotatoServer apachectl[637]: AH00015: Unable to open logs
mar 09 02:08:51 PotatoServer apachectl[637]: Action 'start' failed.
mar 09 02:08:51 PotatoServer apachectl[637]: The Apache error log may have more             information.
mar 09 02:08:51 PotatoServer systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
mar 09 02:08:51 PotatoServer systemd[1]: apache2.service: Failed with result 'exit-code'.
mar 09 02:08:51 PotatoServer systemd[1]: Failed to start The Apache HTTP Server.
Elaborazione dei trigger per man-db (2.8.5-2)...
Elaborazione dei trigger per systemd (241-7~deb10u3+rpi1)...
}```
wordpress apache raspberry-pi raspbian
1个回答
0
投票

mar 09 02:08:51 PotatoServer apachectl [637]:(98)地址已在使用:AH00072:make_sock:无法绑定到地址[::]:80 Mar 0902:08:51 PotatoServer apachectl [637]:(98)地址已在使用中:AH00072:make_sock:无法绑定到地址0.0.0.0:80 mar 0902:08:51 PotatoServer apachectl [637]:没有可用的监听套接字,正在关闭mar 09 02:08:51 PotatoServer apachectl [637]:AH00015:3月9日02:08:51 PotatoServer apachectl [637]无法打开日志:动作“开始”失败。

要解决此问题,您需要更改Apache或Lighttpd正在监听的端口。要在raspbian上更改Apache的默认端口:

nano /etc/apache2/ports.conf

将“侦听80”更改为类似“侦听8080”的其他名称。然后按ctrl-x和y关闭并保存文件。现在,您还需要更改虚拟主机语句。对于默认安装,您可以通过编辑000-default.conf进行此操作。

nano /etc/apache2/sites-enabld/000-default.conf

将VirtualHost *:80更改为VirtualHost *:8080。然后关闭并再次保存文件。

最后,启动Apache。

sudo /etc/init.d/apache2 start

© www.soinside.com 2019 - 2024. All rights reserved.