JavaScript is required

Một máy tính Linux có một địa chỉ địa phương là 192.168.1.1 với subnet mask 255.255.255.0. Vào thời gian này, tất cả các dịch vụ bị từ chối. Mã nào của những dòng này được nối thêm vào file hosts để cho phép truy cập vào các dịch vụ web trên mạng con?

A.

Tất cả trừ httpd: 192.168.1.1/24

B.
httpd: 192.168.1.
C.
192.168.1.255/255.255.255.0:httpd
D.
Tất cả 192.168.1.255/24
Trả lời:

Đáp án đúng: B


None of the options are correct. The correct way to add an entry to /etc/hosts to allow access to web services would be to map the IP address of the web server to a hostname. For example, if the web server's IP is 192.168.1.1 and you want to access it via 'webserver.local', the entry would be '192.168.1.1 webserver.local'. Options A, B, C, and D all contain syntax errors or incorrect use of subnet masks within the /etc/hosts file. The /etc/hosts file simply maps IP addresses to hostnames.

Câu hỏi liên quan