PHP Learning Apache Server detailed _php tutorial

Source: Internet
Author: User

PHP Learning Apache Server detailed


PHP Learning Server--apache Server detailed

Iis servers : Primarily services for Microsoft, based on Internet basic services running Microsoft Windows

Lighttpd Server: open source software, for high performance, bottom memory overhead, CPU footprint, maturity is not enough

Introduction to Apache Server

1. Grasping package Software: Httpwatch.rar, understanding sending and receiving packets

2. Installation of Apache server

1. Check the services that are already installed in Windows to determine if Apache was not previously installed

2. Install Apache server:

3. Whether the test is really successful. Enter http://localhost/display Itworks in the browser to indicate that the installation was successful

3. Apache server usage and configuration, start stop, install and configure

1, refer to the official website of the Apache Chinese version of the reference manual

2. After the Apache installation is successful, Windows runs in a service way.

3, in most cases, the APAHCE server is not local, so it is important to learn to use command line remote management to open or stop.

Httpd–k Start[shutdown "Restart" note "HTTPD this application is in the directory of Apache installation files, it is necessary to set environment variables.

4, Apache default port is 80:http://localhost:80/, in the actual development, often use

Netstat–an

Check which ports on the machine are listening.

Netstat–anb

Discover which program listens on the port, and then use the KILL command to close the process

5, Apache How to configure the port:

Apache can also listen to multiple ports, modify the configuration in the httpd.conf file, we modify the port. Restart the Apache server after the modification is complete.

To listen on multiple ports:

Apache implements listening on multiple ports at the same time.

6, the Apache directory detailed analysis:

Access to the site is relatively simple, directly according to the directory of the path of the sub-directory to visit:

Apache manages functionality in the form of modules. Apache will read httpd.conf This file when it starts, to load the modules of various. So files in the modules.

If you do not want it to be loaded (not using its functionality), you can comment directly (preceded by the # comment). Note: Under normal circumstances, do not change the module it loads ...

Apache's core service is httpd, then loading various services in turn, Apache Open source, can read its source code.

(Apache operating mechanism diagram)

(Apache life cycle graph)

(Apache launch map)

7. Apache Virtual Directory

Requirements: Apache installed in the C drive, complete the D disk as a site to manage a folder.

Settings to implement:

1. Modify the httpd.conf file to add a virtual directory node:

2. Modify the httpd.conf file to unregister the DocumentRoot home directory:

After logging off, you cannot directly access the default directory site under the Apache installation directory.

3, restart can be achieved. (The written content is wrong, Apache will restart the failure, and error!) )

(Original file location)

Use (guided after virtual directory)


8. Set up the Apache Welcome page

Requirement: Direct input http://localhost/myblog, need to get welcome page "Note" MyBlog is the folder that holds the website, not the file.

Implementation: Modify the virtual directory:

(Add a page after DirectoryIndex, the current directory of Kazakhstan, as a welcome interface)

9. Access rights for Apache servers

To set up access to a site's place of storage:

order determines the sequence of permissions, first consider allow (in the figure, allow from all), and then consider deny (or null if no write is in the figure)

10. Configuration of virtual Host in Apache

In fact, it is to set their own IP address and virtual domain name, start to configure the virtual host, and then in the local NDS domain name resolution in the guise of the domain name in order to facilitate the use of domain name access in the browser (domain name access, and then access to local DNS resolution, can not find the remote domain name resolution)

1. Enable httpd-vhosts.conf

Uncomment the httpd-vhosts.conf file in the httpd.conf to start the

2. Add a httpd-vhosts.conf to configure the virtual host

Locate the httpd-vhosts.conf file and add a

In which such modifications are:

Local DNS resolution file, delete and change the file so that the domain name resolution (in fact, domain redirection, easy to hack) file path c:\\windows\system32\drivers\etc\hosts

Remote DNS domain name resolution server address:

Modify the local DNS resolution file and add a message to redirect the fake www.sohu.com to the local Web site.

Detailed description of the process of accessing the Web page (php,jsp,asp,asp.net applies)

Timing Diagram:

"Note" In the network, configure the domain name of the public network (non-127.0.0.1) IP, the computer will not be adapted, but also point to 127.0.0.1

Virtual host IP address is the same, otherwise resolves 403 error

http://www.bkjia.com/PHPjc/963686.html www.bkjia.com true http://www.bkjia.com/PHPjc/963686.html techarticle PHP Learning Apache Server detailed PHP Learning Server--apache Server details Iis server: Mainly to serve Microsoft, based on the Internet basic services running Microsoft Windows ...

  • 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.