zoukankan      html  css  js  c++  java
  • apache windowns 下wamp配置多站点的问题

    1、多站点配置找到apache下面的 conf/httpd.conf


    # Virtual hosts
    Include conf/extra/httpd-vhosts.conf  //将这句前面的#号注释掉

    2、找到conf/extra/httpd-vhosts.conf


    <VirtualHost 127.0.0.1:80>

    DocumentRoot "d:/wamp/www/testadmin/"
    ServerName www.test.com

    </VirtualHost>

    添加以上配置,保存之后重启Apache

    3、到drivers/etc/  打开hosts,添加如下配置

    127.0.0.1       www.test.com

    4、之后就可以用以上自定义域名访问到你的本地站点了!

    配置本地Apache服务器的时候,加入.htaccess文件之后出现以下错误

    nternal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.


    有两种解决方案
    解决1:
    1. 打开 httpd.conf
    2.找到 mod_rewrite.so 行,将前面的注释打开(即删掉前面的'#'符号)。
    3.关闭httpd.conf,重启apache服务器即可。

    解决2:
    httpd.conf 中找到你网站目录对应的Directory 行,将其中的 RewriteEngine 项设置为 'ALL'。
  • 相关阅读:
    假期(面试题二)
    假期(面向对象相关)
    假期(模块相关)
    假期(面试题一)
    假期(函数相关)
    最后一个假期
    Django缓存问题
    python pass关键字神奇吗
    python中类变量,成员变量
    python类中self是什么
  • 原文地址:https://www.cnblogs.com/itafter/p/4502675.html
Copyright © 2011-2022 走看看