I am trying to establish a second virtual server. The file /etc/sites-available/000-default.conf left unchanged. Created a test.com.conf file:
<VirtualHost test.com:80> ServerName test.com ServerAlias www.test.com ServerAdmin jumpjet68@gmail.com DocumentRoot /var/www/test.com/public_html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> created a directory /var/www/test.com/public_html and in it a simple HTML file with one phrase It's works! Did not forget about the team
a2ensite test.com.conf Added to hosts file -
127.0.0.1 test.com It seems to have done everything, but when I try to go to test.com a standard Apachev stub appears from / var / www / html instead of my page from /var/www/test.com/public_html
What did I forget to correct?
$ sudo service apache2 restartnot forgot to do? - aleksandr barakin*, not a domain name. - aleksandr barakin 5:26