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'。
  • 相关阅读:
    luogu P1833 樱花 看成混合背包
    luogu P1077 摆花 基础记数dp
    luogu P1095 守望者的逃离 经典dp
    Even Subset Sum Problem CodeForces
    Maximum White Subtree CodeForces
    Sleeping Schedule CodeForces
    Bombs CodeForces
    病毒侵袭持续中 HDU
    病毒侵袭 HDU
    Educational Codeforces Round 35 (Rated for Div. 2)
  • 原文地址:https://www.cnblogs.com/itafter/p/4502675.html
Copyright © 2011-2022 走看看