• php中搭建Web服务器和服务器配置


    1.搭建Web服务器

        1.1目录结构

     

         1.2访问服务器

    访问规则:http://服务器ip地址/php页面
    比如:
    http://localhost/demo.php
    http://127.0.0.1/demo.php

         1.3Apache常用命令

    httpd -v   查看apache版本号   version
    httpd -t   检测运行环境  test

         1.4互联网通讯原理

          访问过程:

     

          步骤:

          1、客户端输入域名(网址),在最近的机房做DNS解析(Domain Name Server),DNS解析就是将域名转化成IP地址

          2、通过IP地址访问服务器

         1.5DNS解析

         目标:ip地址访问服务器不方便,通过域名来访问。

         hosts文件用来做DNS解析

         2.服务器配置

         2.1虚拟目录配置

     

    <VirtualHost _default_:80>
    #设置根目录
    DocumentRoot "G:phpStudyPHPTutorialphpMyAdmin"
    #设置域名
     ServerName www.phpmyadmin.com
     #目录权限
      <Directory "G:phpStudyPHPTutorialphpMyAdmin">
       #允许将目录结构用索引的方式展示
        Options +Indexes +FollowSymLinks +ExecCGI
        #允许覆盖;,用来做分布式部署
        AllowOverride All
        #执行顺序,先允许,后拒绝
        Order allow,deny
        #允许所有请求
        Allow from all
        Require all granted 
      </Directory>
      </VirtualHost>

           更改默认首页      

    <IfModule dir_module>
        DirectoryIndex index.html index.php index.htm l.php
    </IfModule>

            更改监听端口

    Listen 80

            2.2虚拟主机配置

    <VirtualHost _default_:80>
      DocumentRoot "C:web1"       #指定虚拟目录路径
      ServerName www.baidu.com     # 虚拟目录绑定的域名
      DirectoryIndex aa.php        # 默认首页
      <Directory "C:web1">
        Options -Indexes -FollowSymLinks +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
        Require all granted
      </Directory>
    </VirtualHost>
  • 相关阅读:
    BI.ver.1.实战系列. 用户开户以及登陆的分析
    mdx 时间函数
    MDX 生成复杂的集合
    SSAS远程访问
    mdx 聚合函数
    Spring Cloud 之 Ribbon服务消费(五)
    Spring Cloud 之 Eureka Client服务注册(三)
    Spring Cloud 之 Eureka 高可用集群搭建(二)
    Spring Cloud 之 Feign Client服务消费(六)
    Spring Cloud 之 Feign Client优雅调用(七)
  • 原文地址:https://www.cnblogs.com/shineguang/p/10957754.html
Copyright © 2020-2023  润新知