zoukankan      html  css  js  c++  java
  • apache配置中的小细节

    1. configuration error: couldn’t perform authentication错误的解决办法

    configuration error: couldn’t perform authentication. AuthType not set!: /

    apache 2.4中支持的 granted语法在低版本中不能使用

    需要把下面的语句注释掉:

    # Require all granted

    保存 重启apache 即可!

    1. .htaccess: Invalid command 'RewriteEngine'


    RewriteEngine命令需要rewrite mod的支持

    #LoadModule rewrite_module modules/mod_rewrite.so

    去掉注释,开启即可

    3、附带2个常用的vhost

    <VirtualHost *:80>
        ServerAdmin www.fuck2.com    
        DocumentRoot "d:/mysite/fuck2.com"    
        
        ServerName www.fuck2.com
        ServerAlias fuck2.com    
        
        <Directory "d:/mysite/fuck2.com/">
            Options FollowSymLinks
            AllowOverride All
            Order deny,allow
            Deny from allow
            #Require all granted
        </Directory>
        
        ErrorLog "logs/www.fuck2.com-error.log"
        CustomLog "logs/www.fuck2.com-access.log" common
        DirectoryIndex index.php index.html index.htm index.shtml default.html default.html    
    
    </VirtualHost>
    
    
    <VirtualHost *:80>
        ServerAdmin www.fuck.com
        DocumentRoot "d:/fk_web"
        ServerName www.fuck.com
        ServerAlias fuck.com
    
        <Directory "d:/fk_web/">
            Options FollowSymLinks
            AllowOverride All
            Order deny,allow
            Deny from allow
        </Directory>
        
        
        ErrorLog "logs/www.fuck.com-error.log"
        CustomLog "logs/www.fuck.com-access.log" common
    </VirtualHost>

    4、附带一个www跳转的.htaccess

    <Files ~ "^.(htaccess|htpasswd)$">
    deny from all
    </Files>
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(fuck.com)(:80)? [NC]
    RewriteRule ^(.*) http://www.fuck.com/$1 [R=301,L]
    order deny,allow

    wamp居然是注释了 httpd-vhosts.conf ,难怪总是都指向默认路径了。

    #Include conf/extra/httpd-vhosts.conf
  • 相关阅读:
    函数的命名空间和作用域
    python 各个地方导航(方便查询,持续更新!)
    零基础学虚幻4(UE4):蓝图+VR 丁树凯教程
    UE4打包后的游戏,无法打卡其他关卡的解决办法
    【精辟】进制转换
    Git仓库的初始化
    【编程】杂碎知识点
    MFC制作带界面的DLL库
    StartImage.DLL使用说明
    MFC对话框程序:实现程序启动画面
  • 原文地址:https://www.cnblogs.com/lovelp/p/3964842.html
Copyright © 2011-2022 走看看