This article assumes that you have no knowledge of HTML (The Hypertext Markup Language), which is what websites are technically written in. Instead we will use a program called kompozer that is generates HTML similar to how blogger does.
Run these two commands to get started:
sudo apt-get install apache2
sudo apt-get install kompozerThe first command installs the server software and the second installs kompozer, the editor we will be using. After you install apache2, a directory named "www" will be created in /var. This is where you will place the file named "index.html".
You can link to other pages from the main one by making a link with the name of a file in /var/www or any other file on the computer.
Write the Webpage
Run kompozer with root privileges. (sudo kompozer). You are going to be saving the file in /var/www which is a protected directory by default. Now, all you have to do is... write. Kompozer has all of the tools you will need to make your basic web page. Add text, links, bold text, italicized text, pictures, or whatever you need. If you need mroe power you can edit the HTML directly from the "source" tab if you must. When you are done writing your web page, save it.
The first dialog that will come up will ask you for a title. Name it whatever you want the name of this page to be. This will appear in tabs and on some window lists. Hit okay, and save it as "index.html" in /var/www.
Viewing
You now have a website available on your machine to the world wide web and to your local network. Find your ip address by typing
ifconfig
into the terminal. The wlan address is your IP address. Your local network can access the webpage from this address. To view it from anywhere in the world, you need to port forward your router. To do so, look up your router's manual on port forwarding. My router has an "advanced" dialog at 192.168.0.1, so that may be a good place to start looking. After the forwarding has been set up, you can go to http://your_public_ip to see your website. Typing "ip" into a google search will show you your public IP to use.
No comments:
Post a Comment