HTTP Configure a Virtual Host Flashcards Preview

RHCE > HTTP Configure a Virtual Host > Flashcards

Flashcards in HTTP Configure a Virtual Host Deck (1):
1

Create a HTTP Virtual Host

vim /etc/httpd/conf.d/vhost.conf

{VirtualHost *:80}
ServerAdmin admin@vhost.example.com
DocumentRoot /var/www/html/vhost
ServerName vhost.example.com
ErrorLog logs/vhost-error_log
CustomLog logs/vhost- access_log combined
{/VirtualHost}


mkdir /var/www/html/vhost

echo "Vhost Virtual Host" > /var/www/html/vhost/index.html

httpd -D DUMP_VHOSTS

vim /etc/hosts

10.1.152.34 vhost.example.com

systemctl restart httpd