Simple Web server usage and configuration information in Linux

Source: Internet
Author: User
In Linux, a web server is basically implemented based on httpd. To use a web server, you must first install the httpdyuminstallhttpd software package on httpd, there are three main types of installation: the most basic httpd tool and httpd. i386 is our httpd tool httpd-devel.i386 and is a server software package

In Linux, a web server is basically based onHttpdSo to use the web server, you must first install httpd

Yum install httpd

There are three main types of httpd software packages

The most basic httpd tool is installed.

Httpd. i386 is our httpd tool.

Httpd-devel.i386 is a server package

Httpd-manual.i386 is a variety of instructions, help documentation.

Small extension:

All configuration files are saved in the/etc/httpd directory.

Related log files are stored in/var/log/httpd.

Relevant modules are in/usr/lib/httpd/moDuLes

Related pIdAll files are in/var/run

Related binary files/usr/sbin/usr/bin

Service Script:/etc/rc. d/init/httpd

In the/etc/httpd directory

./Conf directory: stores the main configuration file.

. /Conf. d directory: stores the files that can be divided into configuration files and loaded at startup. all files ending with conf are loaded together when the master configuration file is loaded.

After httpd is installed, we can enable this service!

  1. Service httpd start
  2. Service httpdStatUs

Enable httpd and listener

Small extension:

We often use nststat-tnlCommandTo check whether port 80 is enabled.

Service httpd reload and use this command to re-read the configuration file

After enabling it, you can enter our ip address in your browser!

We see REdWhy is a welcome page that Hat has prepared for us?

In fact, our correct homepage is named "ind" in the/var/www/html/directory by default.Ex. Html

When we do not have this file, it will automatically read the welcome. conf file under/etc/httpd/conf. d/. This file is the home page we can see 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.