Creating A Web Server In Linux

Data & Observations

Our web server is now ready to start serving pages! You can see your server's first web page by typing the machine's IP address into a browser from another computer on your network. If you are unsure how to determine the IP address of your web server, you can obtain it using ifconfig, a utility used to configure, control, and query TCP/IP network interface parameters from the command line.

Obtain IP Address with ifconfig
ben@pyro-dev:~$ sudo ifconfig
Example Output - IP Address Highlighted
eth0      Link encap:Ethernet  HWaddr 00:17:9A:0A:F6:44
          inet addr:192.168.2.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::217:9aff:fe0a:f644/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:227614 errors:0 dropped:0 overruns:0 frame:0
          TX packets:60421 errors:0 dropped:0 overruns:0 carrier:0
          collisions:272 txqueuelen:1000
          RX bytes:69661583 (66.4 MiB)  TX bytes:10361043 (9.8 MiB)
          Interrupt:17

When you do type the IP address for your web server into the browser, you will be greeted with a page that looks like this:

Depending on your network setup and security settings, you may need to make some modifications to allow your computers to see each other, but that is beyond the scope of this article. However, if you can see the above page, your computers can see each other just fine. That also means we can take advantage of the SSH Server we installed in Part 2 of this article. Using a utlity called PuTTY, we can connect to our web server remotely using its IP address.



;