Summary of HTTPD 2.2 experiment

Source: Internet
Author: User

Note: Resolve startup prompt (Cannot find full domain FQDN)

Configuration file ServerName www.a.com (optionally specified)

Tip: Set ignorecase vim search ignores case

/ServerName Name

Note: Process storage location/etc/httpd/run/httpd.pid

Manually created Httpd.id can also be started, generally automatically generated, not recommended for manual creation, attention to permissions/etc/httpd/run

Note: View the software version

Hidden version: Config file servertokens prod (Apache only)

You can also implement a hidden version on the scheduler

Note directive, default to full

Note: Address and port bindings (default local IP)

Can restrict IP, restrict intranet access only through this IP access

Ss-ntl View

Service httpd Reload may not start

No listen will fail to start

View Help: Installing Httpd-manual

Visit: ip://manual

Note: Test the persistent connection

Understanding: Persistent Connection: One connection can download multiple resources

Configuration: KeepAlive on Open

KeepAliveTimeout 15 Timeout Time 15s, not recommended too long

Maxkeepaliverequests 100 Maximum number of connections

The next two lines break the condition, one satisfies can

Note: View MPM mode and modify

Three modes: Prefork, worker, event (pilot phase)

View static module: httpd-l; httpd.worker-l after modification ()

Modify Mode:/etc/sysconfig/httpd file (two figure)

Service httpd Start

Note: Default prefork mode 8 child processes

Explain:

Startservers 80 number of open processes

Minspareservers 5 minimum reserved 5 processes when the service is busy

Maxspareservers 120 maximum reservation, when service is idle

Serverlimit 256 maximum number of processes, Max 20000

maxclients 256 Max concurrency

Maxrequestsperchild 4000

Note: Test prefork.work processing data capability

Requests per second: Watch this item, the average of processing per second

Preford work, almost.

Option:-C Concurrent Connection number

-N Total number of connections

Note: Modify the site home directory

Note: Both open at the same time, the following will overwrite the above, the following effect

Detection syntax: HTTPD-T

Outreach: Include conf.d/*.conf (/ETC/HTTPD)

Note: The default search directory index.html file

Access: Curl Ip/bbs (/var/www/html/subdirectory), displayed as a list when there are no index.html files in the subdirectory

Note: If there is no index.html under/var/www/html, there will be a welcome interface reason (Figure II)

Deleting this file displays the site directory structure, which is more dangerous

Find index.html Reason: DirectoryIndex index.html Index.html.var

Note: Site access control

Options option

FollowSymLinks default support soft connection,-means to remove this function

Indexex display list, index not supported by default

None is not supported, all the opposite

Note: subdirectories inherit the permissions of home directory settings by default

Note: allowoverride all description. htacess all in effect none file fails (equivalent to this row being deleted)

/app/site1/bbs/. htaccess content Options-indexex

Note: All settings will be in. htaccess, allowoverride This line does not write,. htaccess invalid

Access denied to. htaccess in the master configuration file

Note: Still access control

The address in this example does not conflict, it is relatively simple

Note: Standing access control (FilesMatch general use of hermetical expressions)

Regular expression notation to control access

Note: Reject All methods

Order Allow,deny (one can)

Deny from all

Note: Still access control

Set access permissions for directories under Home directory, only for specific host access

Note: Account verification, limit users (Mode 1)

Authentication method:

Basic: Clear Text

Digest: Message Digest authentication, poor compatibility

Note: Require Valid_user: Allow all users in the database to access

Note: Create User:

htpasswd [Options]/path/httpd_passwd_file username

-C: Automatically create files, first create using

-M:MD5 format Encryption

-s:sha format Encryption

-D: Delete user

Final Test

Note: Access control for groups, flexible

Outreach: Satisfy all |any

All: Indicates that both authentication and IP must pass

Any: represents two of one of the satisfied can

Note: View server status information

Default is not turned on, you need to remove comments in the main configuration

Note: FQDN-based virtual host

Note: The top row must be added to the httpd2.2

Note: Access IP or telnet mode host will access the first site

Summary of HTTPD 2.2 experiment

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.