Virtual host berjalan di port 8080 menggunakan software apache2 dengan OS: Centos7
Soal: Buatlah sebuah virtual host berjalan di port 8080 menggunakan software apache2 dengan OS: Centos7, buat file index.html, dan simpan log access dan error di /var/log/httpd/dashboard2 Jawab: #yum install httpd Tambah script Listen8080 dibawah Listen80 di file berikut #vi /etc/httpd/conf/httpd.conf Listen80 Listen8080 #cd /var/www/html #mkdir dashboard2 #chown apache.apache dashboard2 -R #cd dashboard2 #mkdir public #echo "Welcome to Dashboard2" > public/index.html #mkdir /var/log/httpd/dashboard2 #vi /etc/httpd/conf.d/dashboard2.conf <VirtualHost *:8080> ServerAdmin webmaster@sysops.com ServerName 107.102.182.128:8080 DocumentRoot /var/www/html/dashboard2/public/ ErrorLog /var/log/httpd/dashboard2/error.log CustomLog /var/log/httpd/dashboard2/access.log combined </VirtualHost> #systemctl restart httpd