Empezamos, ya me parecia a mi raro
pi@raspberrypi:~ $ cd /var/log/apache2
-bash: cd: /var/log/apache2: No existe el fichero o el directorio
pi@raspberrypi:~ $ sudo /etc/init.d/apache2 start
[....] Starting apache2 (via systemctl): apache2.serviceWarning: Unit file of apache2.service changed on disk, 'systemctl daemon-reload' recommended.
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
failed!
pi@raspberrypi:~ $ sudo systemctl daemon-reload
pi@raspberrypi:~ $ sudo /etc/init.d/apache2 start
[....] Starting apache2 (via systemctl): apache2.serviceJob for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
failed!
pi@raspberrypi:~ $ sudo systemctl status apache2.service
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Drop-In: /lib/systemd/system/apache2.service.d
└─forking.conf
Active: failed (Result: exit-code) since jue 2017-01-12 16:10:25 CET; 24s ago
Process: 794 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
ene 12 16:10:25 raspberrypi apache2[794]: Output of config test was:
ene 12 16:10:25 raspberrypi apache2[794]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the...is message
ene 12 16:10:25 raspberrypi apache2[794]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log
ene 12 16:10:25 raspberrypi apache2[794]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for error log of vhost defined...ult.conf:1
ene 12 16:10:25 raspberrypi apache2[794]: AH00014: Configuration check failed
ene 12 16:10:25 raspberrypi apache2[794]: Action 'configtest' failed.
ene 12 16:10:25 raspberrypi apache2[794]: The Apache error log may have more information.
ene 12 16:10:25 raspberrypi systemd[1]: apache2.service: control process exited, code=exited status=1
ene 12 16:10:25 raspberrypi systemd[1]: Failed to start LSB: Apache2 web server.
ene 12 16:10:25 raspberrypi systemd[1]: Unit apache2.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
Esto ya lo habia hecho y lo hago otra vez
pi@raspberrypi:/var/log $ sudo mkdir apache2
pi@raspberrypi:/var/log $ cd
pi@raspberrypi:~ $ sudo /etc/init.d/apache2 start
[ ok ] Starting apache2 (via systemctl): apache2.service.
Otra vez apaga, apaga, reinicia.....
Y no funciona de nuevo
pi@raspberrypi:~ $ sudo /etc/init.d/apache2 start
[....] Starting apache2 (via systemctl): apache2.serviceWarning: Unit file of ap ache2.service changed on disk, 'systemctl daemon-reload' recommended.
Job for apache2.service failed. See 'systemctl status apache2.service' and 'jour nalctl -xn' for details.
failed!
VAR/LOG/APACHE2 Ha vuelto a desaparecer
pi@raspberrypi:~ $ sudo systemctl daemon-reload
pi@raspberrypi:~ $ sudo systemctl status apache2.service
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Drop-In: /lib/systemd/system/apache2.service.d
└─forking.conf
Active: failed (Result: exit-code) since jue 2017-01-12 16:26:20 CET; 1min 0s ago
ene 12 16:26:20 raspberrypi apache2[668]: Output of config test was:
ene 12 16:26:20 raspberrypi apache2[668]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the...is message
ene 12 16:26:20 raspberrypi apache2[668]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log
ene 12 16:26:20 raspberrypi apache2[668]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for error log of vhost defined...ult.conf:1
ene 12 16:26:20 raspberrypi apache2[668]: AH00014: Configuration check failed
ene 12 16:26:20 raspberrypi apache2[668]: Action 'configtest' failed.
ene 12 16:26:20 raspberrypi apache2[668]: The Apache error log may have more information.
ene 12 16:26:20 raspberrypi systemd[1]: apache2.service: control process exited, code=exited status=1
ene 12 16:26:20 raspberrypi systemd[1]: Failed to start LSB: Apache2 web server.
ene 12 16:26:20 raspberrypi systemd[1]: Unit apache2.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
pi@raspberrypi:~ $ cd /var/log
pi@raspberrypi:/var/log $ ls -l
total 136
-rw-r----- 1 root adm 1880 ene 12 16:27 auth.log
-rw-r--r-- 1 root root 3842 ene 1 1970 boot.log
-rw------- 1 root utmp 0 ene 1 1970 btmp
-rw-r----- 1 root adm 17149 ene 12 16:27 daemon.log
-rw-r----- 1 root adm 1074 ene 1 1970 debug
-rw-r----- 1 root adm 25016 ene 1 1970 kern.log
-rw-r----- 1 root adm 24077 ene 1 1970 messages
-rw-r----- 1 root adm 42599 ene 12 16:27 syslog
-rw-r----- 1 root adm 1084 ene 12 16:25 weewx.log
-rw-rw-r-- 1 root utmp 2688 ene 12 16:26 wtmp
Encuentro una referencia en logrotate
/var/log/apache2/*.log {
daily
missingok
rotate 14
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
if /etc/init.d/apache2 status > /dev/null ; then \
/etc/init.d/apache2 reload > /dev/null; \
fi;
endscript
prerotate
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
run-parts /etc/logrotate.d/httpd-prerotate; \
fi; \
endscript
}
y parece estar bien..........