Day 38th: Apache options and module issues attached: PHP

Source: Internet
Author: User

Small Q: The Sun's wine tone is very light, but very alcohol, shallow pour in every little cup-shaped wildflowers. How is one?

The king is going to hold a feast? Why decorate every corner so luxurious and elegant? Let the people who walk by don't

Free of self-conscious shabby. --Zhang Xiaofeng "Magic season"


=============================== module Problem ==================================

Today in the configuration of some small experiments, encountered the Apache and PHP module problems, record;

Lack of modules, although not error, but also do not want to effect


php: http://beibing.blog.51cto.com/10693373/1699814

In fact, all of the PHP modules are in the EXT directory under the unpacking package, if we install the Curl module:

CD/.../ext/curl

/uer/local/php/bin/phpize PHP Internal command, generate configure file

./configure--with-php-config=/usr/local/php/bin/php-config Call Php-config command

Do & make installs the path to the installation, which is the default.

Go to php.ini config file search/extension, find the place to install the module, add extension=curl.so

If the directory does not need the module, you can go to download a, the same way, I feel no problem;


Ap che:

Configure access control. Anti-theft chain and other small experiments, how also do not come out, and then a variety of search document solutions, and then finally found

The idea, because the anti-theft chain called a rewrite module, but this module is not loaded into Apache:

View:/usr/local/apache/bin/apachectl-m

At this point I found that in fact, many of my modules are not loaded, and loaded into the most dynamic modules, I previously configured 2.2 version of the time

mostly static modules; Since there is no how do we load it, like the PHP method?

In fact, his method is very simple, I found that the Apache configuration file has a lot of annotated modules, open reboot just fine;

In fact, if you do not find, you can refer to the PHP compilation method;

Even go to the official website to find the module download, with the command to generate./configure, then compile and install, move to module storage path



--------------------------------Apache option ---------------------------------

Note: The syntax for Apache2.2 and 2.4 is generic, though there are changes


allowoverride: is to indicate whether the Apache server is looking for a. htacess file as a configuration file, and if set to none, then

The server ignores the. htacess file, and if set to all, then all instructions in the. htaccess file will be rewritten. For allowoverride, it is also possible to specify the following types of instructions that can be overridden.


The rewrite rule is usually written in the. htaccess file when the URL is rewritten using the Apache rewrite module.

However, to enable Apache to read the contents of the. htaccess file properly, you must configure the directory where the. htaccess is located.

From a security consideration, the AllowOverride property of the root directory is generally configured to not allow any override, i.e.

<directory/> allowoverride None </Directory>

When AllowOverride is set to None, the. htaccess file is completely ignored. When this directive is set to all, any directives with the ". htaccess" Scope are allowed to appear in the. htaccess file.


For URL rewrite, at a minimum, you need to set the directory to

< directory/myblogroot/> allowoverride FileInfo </directory>


1 authconfig allows all permission commands to be used, They include Authdbmgroupfile authdbmuserfile

AuthGroupFile AuthName Authtypeauthuserfile and require

2 FileInfo allows the use of file control type directives . They include AddEncoding AddLanguage AddType

DefaultType ErrorDocument languagepriority

3 Indexes allows the use of directory control type directives . They include Adddescription AddIcon

Addiconbyencoding addiconbytype DefaultIcon DirectoryIndex fancyindexing

Headername Indexignore indexoptions Readmename

4 Limit allows permission control directives to be used . They include allow deny and order

5 Options allows you to use commands that control the directory characteristics . They include options and xbithack options



1 All permits the following except MultiViews all functions

2 MultiViews allows multiple content to be browsed, if your directory has a file called Foo.txt, then you can

/foo to visit it, which is useful for a site with a multilingual content

3 Indexes If there is no index file in this directory, the file under this directory is allowed to be displayed for selection

4 includesnoexec allow SSI, but cannot use #exec and # include features

5 includes allow SSI

6 followsymlinks In this directory, the server will track the symbolic link. Note that even if the server traces the symbolic link, it does not

Will change the path name used to match the different regions, if set within the <Local>; tag, this option will be ignored

7 SymLinksIfOwnerMatch only tracks links within this site in this directory

8 execcgi permission to use CGI in this directory





Day 38th: Apache options and module issues attached: PHP

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.