jy166102 发表于 2017-1-1 09:48:55

apache module 解决办法

  在linux中编译apache时,用了默认的configuration。
  运行时 抛错
  httpd: Syntax error on line 29 of ...............: module authz_host_module is built-in and can't be loaded
  这是应为这个module已经被编译到apache里了,不用加载可以直接调用。
  继续运行
  Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
  rewrite module没有编译到apache,需要加载方能调用,在httpd.conf 中,加上
  LoadModule rewrite_module                 modules/mod_rewrite.so
  要看那些模块加载到apahce中,可以/usr/local/apache2/bin/httpd -l
  /usr/local/apache2/bin/apachectl start
  
Forbidden
You don’t have permission to access /server-status on this server.
  
在配置文件中找到ExtendedStatus On ,去掉注释,同时找到
  
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from all
</Location>
其中 Allow from all是运行所有的机器连接,all可以改成ip,但域名不管用。
页: [1]
查看完整版本: apache module 解决办法