Question

AH00111 Doesn't want to change

Posted December 25, 2021 162 views
Apache

Hello community
I have a question please
My problem is:

AH00111: Config variable ${APACHE_RUN_DIR} is not defined                                                                                                                          apache2:
Syntax error on line 80 of /etc/apache2/apache2.conf: 
DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot 

I have already changed the direction to my public folder in 000-default.conf and apache2.conf but this problem and i have http500 error in browser
I used this command to take an idea on the root document but here is the out put

VirtualHost configuration:
*:80
my host (/etc/apache2/sites-enabled/000-default.conf:1) 
ServerRoot: "/etc/apache2" Main DocumentRoot: "/var/www/html"  
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used 

I don’t understand why main document root Don’t change : Main DocumentRoot: “/var/www/html” , in 000-default.conf and apache2.conf, I put / var / www / html / my project / public

edited by bobbyiliev

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

Hello,

In order to change the Document Root for a specific virtual host, you only need to do it in the 000-default.conf virtual host file itself, there is no need to edit the Apache config file.

The error indicates that you have an error in the apache2.conf file on line 80. I would recommend reverting the change that you’ve made to that file and then this should work as expected.

Let me know how it goes.
Best,
Bobby

hello , thank you for your reponse
I have restored the file apache2.conf to its original
and i edited just document root 000-default.conf

I have another question please what does it mean this permission
chmod -R ug+s+rwx
I just know rwx and ug but s no