zoukankan      html  css  js  c++  java
  • apache多域名的配置

    1、修改httpd.conf

    # Virtual hosts

    Include "conf/extra/httpd-vhosts.conf"

    2、修改httpd-vhosts.conf

    NameVirtualHost *:80 去掉前面的#

    绑定多域名

    <VirtualHost *:80>
        DocumentRoot E:/chile/code/haha/
        ServerName haha.mx
        #DirectoryIndex index.php
       # ErrorLog logs/dummy-host2.localhost-error_log
       # CustomLog logs/dummy-host2.localhost-access_log common
    </VirtualHost>

    3、如果页面中一直出现acces forbidden error 430

    (1)首先检查httpd.conf中的# Controls who can get stuff from this server.

    (2)httpd.conf中

        #
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    #
    DocumentRoot "D:/xampp/htdocs"

    #

    # This should be changed to whatever you set DocumentRoot to.

    #

    <Directory "D:/xampp/htdocs">

    这两个地方设置成vhost文件中多域名的根目录。

    如果localhost发生变化了,需要在vhost文件中加入

  • 相关阅读:
    ansible
    celery 计划任务使用
    11 session 使用
    10 模版继承和页面之间的调用
    9 模版语言 jinja2
    8 公共函数
    7 文件上传
    6 获取请求头和URL信息
    5 获取Form表单取值
    4 文件操作 支持图片 视频 mp3 文本等
  • 原文地址:https://www.cnblogs.com/chile/p/3240930.html
Copyright © 2011-2022 走看看