ich versuche gerade weniger oder eher schon mehr verzweifelt, Apache2 auf einem virtuellen Server laufen zu lassen.
uname -a sagt dies:
Code: Alles auswählen
Linux vps 2.6.32-042stab108.6 #1 SMP Thu Jul 9 13:40:24 MSK 2015 x86_64 GNU/Linux
Code: Alles auswählen
Syntax OK
systemctl status apache2.service -l sagt:
Code: Alles auswählen
â apache2.service - Apache2 Web Server
Loaded: loaded (/lib/systemd/system/apache2.service; linked)
Active: failed (Result: exit-code) since Mon 2016-10-03 05:57:01 EDT; 9min ago
Process: 5331 ExecStart=/usr/sbin/apache2ctl start (code=exited, status=1/FAILURE)
Oct 03 05:57:01 vps apache2ctl[5331]: (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80
Oct 03 05:57:01 vps apache2ctl[5331]: no listening sockets available, shutting down
Oct 03 05:57:01 vps apache2ctl[5331]: AH00015: Unable to open logs
Oct 03 05:57:01 vps apache2ctl[5331]: Action 'start' failed.
Oct 03 05:57:01 vps apache2ctl[5331]: The Apache error log may have more information.
Oct 03 05:57:01 vps systemd[1]: apache2.service: control process exited, code=exited status=1
Oct 03 05:57:01 vps systemd[1]: Failed to start Apache2 Web Server.
Oct 03 05:57:01 vps systemd[1]: Unit apache2.service entered failed state.
/etc/apache2/apache2.conf sieht (ohne alle Kommentare und Leerzeilen) so aus:
Code: Alles auswählen
Mutex file:${APACHE_LOCK_DIR} default
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
AccessFileName .htaccess
<FilesMatch "^\.ht">
Require all denied
</FilesMatch>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
Code: Alles auswählen
unset HOME
if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
SUFFIX=
fi
export APACHE_RUN_USER=httpd
export APACHE_RUN_GROUP=httpd
export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid
export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
export APACHE_LOG_DIR=/var/log/apache2$SUFFIX
export LANG=C
Code: Alles auswählen
httpd:x:80:
service:x:80:httpd
Code: Alles auswählen
httpd:x:80:80:httpd,,,:/var/www:/usr/sbin/nologin
drwxr-x--- 2 httpd httpd 4.0K Oct 2 08:55 www
/var/log/:
drwxr-x--- 2 httpd httpd 4.0K Oct 2 09:31 apache2
Was ich einfach nicht verstehe, ich führe den Befehl als root aus, und das Binary /usr/sbin/apache2 gehört httpd.httpd.
apachectl fullstatus sagt:
Code: Alles auswählen
Looking up localhost
Making HTTP connection to localhost
socket failed: family 10 addr ::1 port 80.
Alert!: Unable to connect to remote host.
lynx: Can't access startfile http://localhost/server-status
'www-browser -dump http://localhost:80/server-status' failed.
Maybe you need to install a package providing www-browser or you
need to adjust the APACHE_LYNX variable in /etc/apache2/envvars
Ich bin gerade wohl ziemlich überfordert... Any kind of help appreciated!
Carsten