Apache + php configuration

Source: Internet
Author: User
Installing apachenext-next,

1, download apache and php apache http://apache.etoak.com/httpd/binaries/win32/apache_2.0.63-win32-x86-no_ssl.msi php http://cn2.php.net/distributions/php-5.3.0.tar.bz2 2, install apache next-next ...... fill in three content including email 3,

1. Download apache and php

Apache http://apache.etoak.com/httpd/binaries/win32/apache_2.0.63-win32-x86-no_ssl.msi

Php http://cn2.php.net/distributions/php-5.3.0.tar.bz2

2. install apache

Next-> next .....

Enter 3 content including email

3. install php

Decompress the downloaded php-5.2.0-win32.zip File

4. apache accessing php

1. Add the variable path = "php installation path ";

2. Change conf/httpd. conf

LoadModule php5_module "php installation path/php5apache2. dll"
AddType application/x-httpd-php. php

3. Change the name of php. ini-dist or php. ini-recommended to php. ini and copy it to the apache directory.

4. Restart apache

5. test

OTHERS

Httpd. conf

Alias/mp4/"/mylovemusic/" # mp4: the name of the virtual directory./mylovemusic/is the real directory.

Options Indexes MultiViews
AllowOverride AuthConfig # No authentication is required when it is set to None
AuthName "please input your name and passwd"
AuthType Basic
AuthUserFile/mylovemusic/. htpasswd # verify the configuration file of the user name and password
AuthGroupFile/mylovemusic/. htgroup # verify the configuration file of the user group
Require group gdlcgroup # log on to the GDLCGROUP User group
Require user gdlc # Allow gdlc user Login
Allow from 10.0.2.0/24 # Allow all

1. Create a verified user
Htpasswd-c/var/www/html/. htpasswd Username
Create a verified user group
Cd/var/www/html/
Vi. htgroup
Gdlcgroup; jake gdlc
2. Create the. htaccess authentication file under/var/www/html /.
AuthName "please input name & passwd"
AuthType Basic
AuthUserFile/var/www/html/. htpasswd
AuthGroupFile/var/www/html/. htgroup
Require group gdlcgroup # receive all information in the group
Require user jake # receive this user from him

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.