Difference between revisions of "Tung httpd conf"
(→Creating a Public Web Page) |
|||
Line 8: | Line 8: | ||
===Creating a Public Web Page=== | ===Creating a Public Web Page=== | ||
# Login as root user | # Login as root user | ||
− | # Configure the Apache server to start when the Fedora is booted: chkconfig httpd on | + | # Configure the Apache server to start when the Fedora is booted: <b><code><font color=green >chkconfig httpd on</font></code></b> |
− | # Start the Apache server: service httpd start | + | # Start the Apache server: <b><code><font color=green >service httpd start</font></code></b> |
− | # Create index.html in /var/www/html/ directory, write some html code in the file | + | # Create index.html in <b><code><font color=brown >/var/www/html/ </font></code></b>directory, write some html code in the file |
− | # Open a browser, and enter http://localhost. Your page should display. | + | # Open a browser, and enter <code> http://localhost </code>. Your page should display. |
− | # Make web page accesses by other hosts: iptables -I INPUT -p tcp --dport http -j ACCEPT | + | # Make web page accesses by other hosts: <b><code><font color=green >iptables -I INPUT -p tcp --dport http -j ACCEPT</font></code></b> |
Revision as of 17:31, 27 July 2011
Running and Configuring Apache Server
Introduction
In this page, you are going to set up a Apache server and allow a user create his own personal web page.
Creating a Public Web Page
- Login as root user
- Configure the Apache server to start when the Fedora is booted:
chkconfig httpd on
- Start the Apache server:
service httpd start
- Create index.html in
/var/www/html/
directory, write some html code in the file - Open a browser, and enter
http://localhost
. Your page should display. - Make web page accesses by other hosts:
iptables -I INPUT -p tcp --dport http -j ACCEPT