I know the thread Apache2 config variable is not defined but here the problem is most probably about ownership/permissions of the newly created user, see the bottom of the thread for the hypothesis of the problem. I run in Raspbian Jessie
sudo a2enmod headers
and
- My
/etc/apache2/envvars
is the same as here. - I successfully did self-signed SSL certificate as described here;
openssl s_client -connect localhost:443
returns the expected output.
I run sudo apache2 -k graceful
but the output is
[Tue May 31 14:47:38.182913 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Mon Apr 21 17:36:38.019345 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Mon Apr 21 17:36:38.019370 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Mon Apr 21 17:36:38.019385 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Mon Apr 21 17:36:38.019414 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Mon Apr 21 17:36:38.028756 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Mon Apr 21 17:36:38.029032 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Mon Apr 21 17:36:38.029056 2016] [core:warn] [pid 5212] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf:
Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}
Doing source /etc/apache2/envvars
and running the command gives still the same output.
I am not sure about the problem.
HBruijn's proposals
- The command
sudo service apache2 graceful
seems to work; output[OK] Reloading webserver: apache2
. Is that ok? What should I check then? Why was the original error there? - The command
sudo apache2ctl graceful
returns then again just an empty line. Is that OK?
Why are you getting such an output with apache2 -k graceful
?
>
) after asudo
command does not run with elevated permissions, but with the permissions of the original user, a common misconception and the probable cause for your permission denied issue./tmp/
or another directory where the original user can write...sudo service apache2 graceful
works or apache2ctlsudo service apache2 graceful
seems to work; output[OK] Reloading webserver: apache2
. Is that ok? What should I check then? Why was the original error there? The commandsudo apache2ctl graceful
returns then again nothing, just empty line. Is that OK?