Administrasi Sistem Jaringan ❘ Web Server Configuration
A. Learning Objective
Understand the basics of web servers and http protocol
Learn to install and configure web server software like Apache
B. Learning Material
Web server configuration involves setting up and fine-tuning the server to meet specific needs, ensuring stable, secure, and efficient delivery of web content. This includes configuring directories, access controls, HTTP/HTTPS protocols, virtual hosting, and performance optimization.
C. Learning Preparation
It would be beneficial to have some preparation before learning about DHCP server configuration. Some tools and materials could be useful for that, such as:
1. PC/LAPTOP
2. Internet
3. Iso file Linux Debian 11 (Server)
4. Iso file Windows 10 (Desktop)
5. PuTTY
6. VMware (for virtual machine)
D. Configuration
1.Before starting the web server configuration, make sure the DNS Server is set up and working properly before configuring the web server. DNS translates domain names into IP addresses, so users do not need to remember IP addresses. DNS configuration includes forward and reverse zone configuration to ensure proper domain-to-IP and IP-to-domain resolution.
2. Then, first restart the bind9 package with the systemctl restart bind9 command. Then, try a ping test to the web server domain, namely www.fibina.net.
3. After making sure the DNS server is working properly, the next step is to install the Apache2 web server. Apache2 can be installed by using the `apt install apache2 -y` command.
4. If the apache2 package has been successfully installed, the next step is to enter the apache2 directory, with the command cd /etc/apache2/sites-available.
5.After that, to create a new vhost, we will copy the default configuration file from 000-default.conf using the name fibina.conf, here we can edit the contents of the file as needed.
6. Open the file we just copied using the nano fibina.conf command, then find the #servername line and remove the hash marks. Replace www.example.com with our domain, for example here is www.fibina.net.
7. Now, next we will set up the content on the web server. To do this, we can access it in the /var/www/html directory.
8. Then edit the index.html file with the nano index.html command. Edit according to the wishes and needs of the web.
9.To enable the virtual host configuration, navigate to the `/etc/apache2/sites-available` directory and disable the default configuration with the command /usr/sbin/a2dissite 000-default.conf, this command will disable the default site so that Apache no longer uses it when handling web requests. Also, we will enable the virtual host that we have duplicated from the default virtual host.
10. To apply the Apache2 configuration changes, restart the service with the systemctl restart apache2 command
E. Result of Configuration
1.To do a testing, on a windows client search for our domain in a browser application such as chrome, or internet explorer. But on this occasion, we will use chrome.
In conclusion, configuring an Apache2 web server involves installing Apache2, configuring DNS Server, creating virtual hosts, editing virtual host configuration files, creating web content, activating virtual hosts, and restarting the Apache2 service to apply changes so that the web server can serve web requests for a particular domain.
0 Komentar