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

Apache + php 配置

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Freigeben: 2016-06-06 19:48:21
Original
1037 Leute haben es durchsucht

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这个用户

Verwandte Etiketten:
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Aktuelle Ausgaben
Apache stoppt automatisch
Aus 1970-01-01 08:00:00
0
0
0
Apache-Fehler
Aus 1970-01-01 08:00:00
0
0
0
Wie Apache protokolliert
Aus 1970-01-01 08:00:00
0
0
0
Der Apache-Neustart ist fehlgeschlagen
Aus 1970-01-01 08:00:00
0
0
0
Beliebte Empfehlungen
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage