-
-
Save okitavera/4233e4ace615a1377a691bf752335498 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
masuk ke mode root: | |
# sudo su | |
masuk ke folder www | |
# cd /var/www | |
buat folder nya (contoh cobaweb) : | |
# mkdir /var/www/cobaweb.com | |
buat file index.html nya : | |
# gedit /var/www/cobaweb.com/index.html | |
chown foldernya : | |
# chown -hR namauser:namauser /var/www/cobaweb.com | |
masuk ke folder apache2/sites-available: | |
# cd /etc/apache2/sites-available/ | |
copy file 000-default.conf ke nama webnya: | |
# cp 000-default.conf cobaweb.conf | |
edit file yang barusan dicopy: | |
# gedit cobaweb.conf | |
ganti <VirtualHost *:80> jadi <VirtualHost cobaweb.com:80> | |
hapus comment di bagian ServerName, dan edit www.example.com (misal jadi www.cobaweb.com) | |
lalu tambahkan dibawahnya: | |
ServerAlias www.cobaweb.com | |
edit DocumentRoot /var/www/html nya ke folder tadi (misal jadi /var/www/cobaweb.com) | |
save | |
lalu aktifasi sitenya: | |
# a2ensite cobaweb.conf | |
edit file hosts: | |
# gedit /etc/hosts | |
tambahkan di paling bawah: | |
127.0.0.1 cobaweb.com | |
127.0.0.1 www.cobaweb.com | |
lalu save. | |
restart service apachenya: | |
# sudo service apache2 reload | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment