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文件中加入

  • 相关阅读:
    使用阿里云ECS安装HDFS的小问题
    退役回忆录嘤嘤嘤
    2018 ICPC北京 H ac自动机
    Educational Codeforces Round 54 (Rated for Div. 2) DE
    sa learning
    网络流learning
    Python模块logging
    Python模块unittest
    Linux /dev/shm
    Shell 字符串操作
  • 原文地址:https://www.cnblogs.com/chile/p/3240930.html
Copyright © 2011-2022 走看看