Create first web page on Fedora Core Web Server.

 

Create first web page on Fedora Core Web Server.

 

Step by step guide to create your own first web page on Fedora Core Linux Apache web server.

 

1.  Open desktop x-terminal, then using the nautilus program go to the directory where you should put your web contents; Please note that the example show in this article use the /var/www/html/ directory as the web contents directory.

 

[root@localhost ~]# nautilus /var/www/html/

 

open folder nautilus var www html

figure 01: php/open_nautilus.png

 

2.  Point mouse pointer inside the html directory and right mouse click button, point to and click Create Document -> Empty File to create new empty text document inside the /var/www/html/ directory.

 

Create Document Create Empty File

figure 02: php/empty_file.png

 

3.  Click on the "new file" that you just create and rename the file to "index.html".

 

Rename file index.html

figure 03: web/index_html.png

 

4.  Right click mouse button on the index.html page and point the mouse pointer to Open With and choose the text editor that you want to use to edit the index.html page from the list.

Note: The figure below show that the "text editor" (gedit) is the editor that use in this article.

 

Open edit html file with text editor

figure 04: web/text_editor.png

 

5.  Type in the "html code" as on example below or you can copy and paste the html code below or create your own html code using the text editor.

Note: Make sure that you click the "Save" button after finish the editing process.

 

Html Code Example:

<html>
<head>
<title>My Own, First Web Page</title>
</head>
<body>
<h1>Hello World !!!</h1>
<p>Hello World !!!, This is my first web page,</p>
<p>On Fedora Core Linux using Apache web server.</p>
</body>
</html>

 

Editing html code using "gedit" editor:

Edit html code using linux gedit editor

figure 05: web/html_editor.png

 

6.  Open web browser and point the address field to your web server address or domain name (fqdn) and click Go button to start browsing.

The example below show my first web page that I'm wrote earlier.

 

Example of index.html page:

creating first web page, hello world

figure 06: web/first_web_page.png

 

 

Troubleshoot.

 

If your browser display the Forbidden page look like example below:

Forbidden

You don't have permission to access /index.html on this server.


Apache/2.2.3 (Fedora) Server at 127.0.0.1 Port 80

 

 

Check the index.html page permission, make sure that the index.html readable by world (others).

 

1.  Using the Linux "ll" command to check the permission of the index.html, from the output of the "ll" command show that the index.html page not readable by world (others).

 

[root@localhost html]# ll

total 8

-rw------- 1 root root 212 Feb 27 02:38 index.html

[root@localhost html]#

 

2.  Change the permisson of index.html page using Linux "chmod" command to make the index.html readable by word (others).

 

[root@localhost html]# chmod 644 index.html

 

3.  Issue the "ll" command again to verify the changes.

 

[root@localhost html]# ll

total 8

-rw-r--r-- 1 root root 212 Feb 27 02:38 index.html

[root@localhost html]#

 

Related:

1.  Apache / httpd web server installation and configuration.

2.  PHP installation and information.

 

Keywords: create web page, first web page, display web page, web page, html page, edit html code, html code, index.html, index page, first page, index.html, edit web page, edit page, edit html, forbidden page.

 

4 comments

27
Aug

Fedora...

the best tutorial...
10
Oct

apache config worked great

A worth tutorial.
19
Oct

Fedora

Tutorial works great worth the time to read.

19
Oct

works great. worth the time

works great. worth the time to read.

aaaaaaaaaaa