Answer the question
In order to leave comments, you need to log in
How to change apache document_root from /var/www/html to /var/www/test/html/public?
There is a vps with apache and php on it.
from various articles tried different solutions but didn't work in the end, can't go beyond the default config.
added my folder to /var/www/, created a new config in /etc/apache/sites-available/*.conf, deactivated the old config from 000-*-.conf, activated the new one (a2dissite 000-default.conf, a2ensite example. com.conf), checked for errors and rebooted (apache2ctl configtest, systemctl restart apache2 )
How can I change paths?
Answer the question
In order to leave comments, you need to log in
Solution - added to /etc/apache2/apache2.conf a line with the DocumentRoot in the desired path
If there is a solution without editing this config, please share
do you need to change the docuement root for the secondary site or for the default?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question