Httpd. conf configuration in Apache

Source: Internet
Author: User
First, the role of each folder in the Apache Directory is described as follows: bin: stores all the software running in Apache, including a folder named ad. e. First, the role of each folder in the Apache Directory is described as follows:

Bin: stores all the software running on apache. package a server debugging tool named ad.exe.

Conf: put the Apache configuration file in this folder. we need to modify the httpd. conf file.

Htdocs: the default web home directory. you can modify the path of the website root directory in httpd. conf.

Next let's modify the httpd. conf file.

The httpd. conf file is an important configuration file for Apache work. find it in X: Apache GroupApache2conf and open it with notepad. You can modify it as follows:

ServerRoot "X:/Apache Group/Apache2"

This is the root path of the server and does not need to be changed.

MaxKeepAliveRequests 100

The maximum number of online users depends on the number of users you need and the configuration of your server.

Listen 80

The listening port of Apache2, which is usually the http port of the website.

DocumentRoot "C:/htroot"

This is where you place the webpage file. the compiled PHP file is placed here. make sure that this folder exists, which is your site directory.

Same as above. follow the previous step to make sure the folder exists.

DirectoryIndex index.htm index. php index.html

This is the document type of the home page opened by the server by default. it can be changed to the above type, with an empty lattice in the middle.

LanguagePriority zh-CN zh-TW en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt-BR ru sv

Language priority. cut the part of Chinese (zh-CN zh-TW) to the front (that is, change the corresponding part of the original file to the above)

In addition, if you want to disable homepage browsing, find the following code:

Options Indexes FollowSymLinks

Remove the indexes and change it:

Options FollowSymLinks

Step 3: Mount PHP

Search for LoadModule in httpd. conf and add the following content later.

LoadModule php5_module "X:/PHP/php5Apache2. dll"

AddType application/x-httpd-php. php

Note: X: PHP/PHP5Apache2. dll indicates the path for installing PHP.

Restart Apache to make the modification take effect

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.