Maison > php教程 > php手册 > Apache + php 配置

Apache + php 配置

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Libérer: 2016-06-06 19:48:21
original
1033 Les gens l'ont consulté

1、下载apache与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、安装apache next-next-next ..... 填写三内容 包括email 3、

      

      1、下载apache与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、安装apache      

            next->next->next .....

            填写三内容 包括email

      3、安装php

            解压缩下载的php-5.2.0-Win32.zip

      4、apache接入php

            1、添加变量 path="php安装路径";

            2、conf/httpd.conf 更改内容

            LoadModule php5_module "php安装路径/php5apache2.dll"
            AddType application/x-httpd-php .php

            3、php.ini-dist或php.ini-recommended 更名为php.ini 拷贝在apache目录下

            4、重新启动apache

      5、test

            

 

      OTHERS

      httpd.conf 配置虚拟路径

      Alias /mp4/ “/mylovemusic/”                                    #mp4:是虚拟目录的名称,/mylovemusic/是真正目录
      
            Options Indexes MultiViews
            AllowOverride AuthConfig                                     #为None 时为不用有身份验证
            AuthName “please input your name and passwd”
            AuthType Basic
            AuthUserFile   /mylovemusic/.htpasswd                  #验证用户名和密码的配置文件
            AuthGroupFile /mylovemusic/.htgroup                    #验证用户组的配置文件
            Require group gdlcgroup                                      #许可GDLCGROUP用户组登陆
            Require user   gdlc                                             #许可gdlc用户登陆
            Allow from 10.0.2.0/24                                        #许可10.0.2.0/24网内登陆 为all 时是许可所有
      
      1,创建验证用户
            htpasswd -c /var/www/html/.htpasswd 用户名
            创建验证用户组
            cd /var/www/html/
            vi .htgroup
            gdlcgroup; jake gdlc
      2,在/var/www/html/ 下创建 .htaccess认证文件
            AuthName “please input name&passwd”
            AuthType Basic
            AuthUserFile /var/www/html/.htpasswd
            AuthGroupFile /var/www/html/.htgroup
            Require group gdlcgroup                                     #接收组内所有信息
            Require user jake                                              #接收jake这个用户

Étiquettes associées:
Déclaration de ce site Web
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn
Derniers numéros
La différence entre Nginx/Apache et Apache Tomcat
Depuis 1970-01-01 08:00:00
0
0
0
Apache s'arrête automatiquement
Depuis 1970-01-01 08:00:00
0
0
0
Comment configurer Gitblog sur Apache ?
Depuis 1970-01-01 08:00:00
0
0
0
Comment Apache se connecte
Depuis 1970-01-01 08:00:00
0
0
0
Est-ce possible sans installer Apache ?
Depuis 1970-01-01 08:00:00
0
0
0
Recommandations populaires
Tutoriels populaires
Plus>
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal