Question on the training task. It is necessary to give examples of Apache server configuration file fragments for test.ru, test2.ru, www.test2.ru domains.
Test.ru and test2.ru domains refer to different (any) folders, www.test2.ru and test2.ru domains for one folder.
For all domains, the mod_headers module should be enabled, and for the test2.ru and www.test2.ru domains, add the mod_deflate filter for html files.
Tell me if my decision is correct and point out the errors, if any.
ServerName test.ru DocumentRoot “/home/www/test/” # Подключение модуля mod_headers LoadModule headers_module modules/mod_headers.so ServerName test2.ru DocumentRoot “/home/www/test2/” <VirtualHost *> ServerName www.test2.ru DocumentRoot “/home/www/test2/” </VirtualHost> # Подключение модуля mod_headers LoadModule headers_module modules/mod_headers.so # Подключение модуля mod_headers LoadModule deflate_module modules/mod_deflate.so AddOutputFilterByType DEFLATE text/html