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'。
  • 相关阅读:
    更改SQLServer实例默认字符集
    使用DMV排查数据库系统异常
    OD使用符号文件进行源码级调试问题
    申请博客园第一天
    各种mac软件地址
    第6条:理解“属性”
    提高代码质量的几个方法!52个,先罗列几个自己看
    Item2的使用
    MAC命令大全
    PV UV IP
  • 原文地址:https://www.cnblogs.com/itafter/p/4502675.html
Copyright © 2011-2022 走看看