一、PHP生命周期

  

二、轻量级的PHP
  轻量级PHP产品由lighttpd,nginx等等
  Apache是基于模块化设计的
  了解Apache源代码可以从main.c开始
  操作系统上跑了APR运行库
  mpm:mutil proscessing module多重模块管理
  apr:可移植运行库。

  

  

  需求:
  apache安装在C盘,但是出现c盘就没有空间,d盘有更多的空间,能不能把d盘的一个

  文件夹下网页html当做网站管理

  复制一些代码到在Apache的httpd.conf文件中,路径:Apache2.2\conf\httpd.conf

  三、配置虚拟目录

    3.1、添加虚拟目录节点(文件夹):myblog,在httpd.conf文件中找到<IfModule dir_module></IfModule>语句块,在这个语句块后面,添加以下代码

     <IfModule dir_module>
    #directory设置欢迎界面
    DirectoryIndex index.php index.html index.htm
    #你的站点别名
    Alias /myblog "F:/myblog" 存放的物理路径
      <Directory "F:/myblog">
      #访问权限设置
      Order allow,deny
      Allow from all
      </Directory>
    </IfModule>

    3.2、使用“#”号注销路径:DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

    3.3、重启Apache

    3.4、测试
      http://localhost/myblog/news.html

    3.5、如何设置欢迎页面
      http://localhost/myblog/
     设置<IfModule dir_module>和</IfModule>之间添加news.html,设置news.htm为默认页
    

 <IfModule dir_module>
#directory设置欢迎界面
DirectoryIndex news.html index.php index.html index.htm
#你的站点别名
Alias /myblog "F:/myblog" 存放的物理路径
  <Directory "F:/myblog">
  #访问权限设置
  Order allow,deny
  Allow from all
  </Directory>
</IfModule>

    3.6、关于Apache权限的讲解

    

Apache虚拟目录(二)的更多相关文章

  1. apache虚拟目录配置实例

    apache虚拟目录配置实例 一.首先,开启虚拟主机配置 在文件httpd.conf中找到: include conf/extra/httpd-vhosts.conf #开启 二.对httpd-vho ...

  2. 【PHP编程之路-1】设置apache虚拟目录

    概述 设置apache虚拟目录 1.开启“虚拟目录配置文件”httpd-vhosts.conf 文件路径:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-v ...

  3. Apache虚拟目录

    Apache虚拟目录  1.打开Apache的配置文件httpd.conf,并去掉#Include conf/extra/httpd-vhosts.conf前面的#! 2.在httpd.conf 末尾 ...

  4. 在apache虚拟目录配置

    在apache虚拟目录配置中 <VirtualHost *:80>xxx xxx xxx</VirtualHost> 不能写成 <VirtualHost *>xxx ...

  5. Apache 虚拟目录和默认首页的设置

    Apache虚拟目录和默认首页的设置,用apache服务器的朋友必须要懂的. 虚拟目录 1.找到"conf/httpd.conf" 文件 2.在节点:<IfModule al ...

  6. Ubuntu 配置Apache虚拟目录

    http://blog.csdn.net/spring21st/article/details/6589300 Ubuntu 配置Apache虚拟目录 http://blog.csdn.net/spr ...

  7. apache 虚拟目录

    补充:必须使用80端口才能正常使用  C:\Windows\System32\drivers\etc\hosts 最后添加上: 127.0.0.1 shenyi.com 127.0.0.1 offli ...

  8. ubuntu18.04LTS配置apache虚拟目录(基于端口)

    假设在用户目录下要新建两个虚拟目录web1,web2,分别对应端口8081,8082 $ cd ~ #切换到用户目录 $ mkdir www #新建www文件夹,以后新建的虚拟目录都放在该文件夹下 $ ...

  9. Apache虚拟目录实现同一个IP绑定多个域名

    在前:我使用的是Xampp,所以路径可能不同 找到apache\conf\extra\httpd-vhosts.conf, 如果没有的话请自己新建httpd-vhosts.conf文件, 并且在htt ...

随机推荐

  1. ListView配合BaseAdapter

    BaseAdapter使用比较麻烦,它是个抽象类,需要重写4个方法分别是getCount() getItem(..) getItemId(..) getVew(..),相应的使用BaseAdapter ...

  2. android 属性

    RelativeLayout 第一类:属性值为true可false android:layout_centerHrizontal        水平居中 android:layout_centerVe ...

  3. 解决由于一个软件限制策略的阻止,windows无法运行此程序cmd.reg

    解决由于一个软件限制策略的阻止,windows无法运行此程序cmd.reg Windows Registry Editor Version 5.00 [-HKEY_LOCAL_MACHINE\SOFT ...

  4. C++ 如何重复利用一个内存地址块

    #include<iostream> using namespace std; ; }; int main(int argv ,char * args[]) { double *p1,*p ...

  5. 172. Factorial Trailing Zeroes -- 求n的阶乘末尾有几个0

    Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in log ...

  6. 下载模板,上传EXCEL

    说道SAP里对EXCEL操作的大概就是上传,下载,显示了... 下载:(文档是通过SMW0上传的)注:如果下载的时候需要填充EXCEL的值,...请参考另一篇文档,OLE CALL METHOD CL ...

  7. js-分享107个js中的非常实用的小技巧(借鉴保存)

    转载原文:http://***/Show.aspx?id=285 1.document.write(""); 输出语句 2.JS中的注释为// 3.传统的HTML文档顺序是:doc ...

  8. struts2视频学习笔记 03-06(Struts 2配置文件无提示问题,Action配置中的各项默认值,各种转发类型)

    课时3 解决Struts 2配置文件无提示问题(eclipse):window→preference→XML→XML Catlog

  9. jQuery修改后代、兄弟样式

    <div> <div >1</div> <div class="one"> 2 <div>2_1 <div> ...

  10. js刷新页面和跳转

    javascript返回上一页: 1.返回上一页 history.go(-1); 返回上两个页面 history.go(-2); <a href="javascript:history ...