RHELAS4 detailed tutorial on web Server Installation and debugging

Source: Internet
Author: User
As an enterprise operating system, RHELAS4 naturally contains basic web server programs. To learn about server configuration, we plan to download a newer version of today's web server from the Internet, and install it step by step to enjoy DIY! Before performing the following operations, make sure that your system has not installed the web server that comes with the system. 1. WEB Server (ApacheVer2.0.53) Apachev2.0.53forLinux: the most popular hrhel AS 4 is an enterprise-level operating system. The installation CD naturally contains basic web server programs. To learn about server configuration, we plan to download a newer version of today's web server from the Internet, and install it step by step to enjoy DIY!
Before performing the following operations, make sure that your system has not installed the web server that comes with the system.

   I. WEB Server (Apache Ver2.0.53)
Apache v2.0.53 for Linux: One of the most popular HTTP server software, which is completely free and fully open-source. If you need to create a Web server that is accessible to millions of people every day, Apache may be the best choice.
1. Download
Http://down.chinaz.com/S/9064.asp
2. Installation
(1) Extract
Decompress the downloaded apache2.tar.gz package to a temporary directory, such as/usr/local/src/
(2) Compile and install
Enter the extracted directory.
If you want to put Apache2 under/usr/local/apache, then:
#./Configure -- prefix =/usr/local/apache
(Note: Do not add the "/" number at the end of the uplink)
# Make
# Make install
Installation Complete
(3) Start
#/Usr/local/apache/bin/apachectl start
3. Test
Open your Firefox browser, enter http: // localhost/in the address bar, and press Enter.
Haha, see the familiar color goose logo. Congratulations! The first step went very smoothly!
4. Configuration
The configuration file of your Apache server is/usr/local/apache/conf/httpd. conf.
Edit the file:
(1) Change the user's web directory to/var/www/html (in the future, the var/www/html directory is the place where your web files are stored. Of course, you can also specify it as another directory)
Use # unregister DocumentRoot "/usr/local/apache/htdocs" near line 1"
Add the following line: DocumentRoot "/var/www/html"
(2) Add the index file index.htm
Add "index.htm" after "direct directindexrow"
DirectoryIndex index.html. var index.htm
(3) Save and exit
(4) restart the web server: httpd-k restart
(Command Description: start the server: httpd-k start
Shut down the server: httpd-k stop
)
Reminder: For convenience, we recommend that you create a desktop link to start and close the server.
5. retest
Use the vi or text editor to edit the following files:



 

<BR> my test page <BR>


This is my first test page!

This is my first test webpage!


Save as/var/www/html/index.htm
Now, enter http: // localhost/in the address bar of the firefox browser again to see your test page. If garbled characters appear, adjust the character encoding of your browser. Now OK.
Happy now!
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.