欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

apache查看已加载的modules方法 有大用

linux下进入httpd所在的目录 输入以下命令:


./apachectl -t -D DUMP_MODULES

显示如下:



Passing arguments to httpd using apachectl is no longer supported.
You can only start/stop/restart httpd using this script.
If you want to pass extra arguments to httpd, edit the
/etc/sysconfig/httpd config file.
Loaded Modules:
 core_module (static)
 so_module (static)
 http_module (static)
 access_compat_module (shared)
 actions_module (shared)
 alias_module (shared)
 allowmethods_module (shared)
 auth_basic_module (shared)
 auth_digest_module (shared)
 authn_anon_module (shared)
 authn_core_module (shared)
 authn_dbd_module (shared)
 authn_dbm_module (shared)
 authn_file_module (shared)
 authn_socache_module (shared)
 authz_core_module (shared)
 authz_dbd_module (shared)
 authz_dbm_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_owner_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cache_module (shared)
 cache_disk_module (shared)
 data_module (shared)
 dbd_module (shared)
 deflate_module (shared)
 dir_module (shared)
 dumpio_module (shared)
 echo_module (shared)
 env_module (shared)
 expires_module (shared)
 ext_filter_module (shared)
 filter_module (shared)
 headers_module (shared)
 include_module (shared)
 info_module (shared)
 log_config_module (shared)
 logio_module (shared)
 mime_magic_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 remoteip_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 slotmem_plain_module (shared)
 slotmem_shm_module (shared)
 socache_dbm_module (shared)
 socache_memcache_module (shared)
 socache_shmcb_module (shared)
 status_module (shared)
 substitute_module (shared)
 suexec_module (shared)
 unique_id_module (shared)
 unixd_module (shared)
 userdir_module (shared)
 version_module (shared)
 vhost_alias_module (shared)
 dav_module (shared)
 dav_fs_module (shared)
 dav_lock_module (shared)
 lua_module (shared)
 mpm_prefork_module (shared)
 proxy_module (shared)
 lbmethod_bybusyness_module (shared)
 lbmethod_byrequests_module (shared)
 lbmethod_bytraffic_module (shared)
 lbmethod_heartbeat_module (shared)
 proxy_ajp_module (shared)
 proxy_balancer_module (shared)
 proxy_connect_module (shared)
 proxy_express_module (shared)
 proxy_fcgi_module (shared)
 proxy_fdpass_module (shared)
 proxy_ftp_module (shared)
 proxy_http_module (shared)
 proxy_scgi_module (shared)
 proxy_wstunnel_module (shared)
 ssl_module (shared)
 cgi_module (shared)




猜测其中static是安装时编译进进去的扩展,而shared是通过配置文件加载的动态链接库,如有错误请指正。



来自 https://blog.csdn.net/zhang197093/article/details/51376125



#   httpd -M  



apache模块的安装、查看方法

在创建网站应用程序的时候,使用apache作为网站服务器的有很多,我们有时候在添加apache的扩展模块时对于新手来说还是比较麻烦的,在这里介绍一个工具,来提高配置扩展模块的效率。

工具名:a2enmod

这是apache带的工具,可以简化apache添加扩展的操作步骤

  • 启用mod_rewrite模块:

sudo a2enmod rewrite
  • 查看mod_rewrite状态:

sudo a2enmod rewrite status

当我们要查看当前apache加载了那些模块的时候可以使用一下的命令:

sudo apachectl -l

运行命令后显示:

Compiled in modules:
  core.c
  mod_access.c
  mod_include.c
  mod_deflate.c
  mod_log_config.c
  mod_expires.c
  mod_setenvif.c
  prefork.c
  http_core.c
  mod_mime.c
  mod_cgi.c
  mod_dir.c
  mod_alias.c
  mod_rewrite.c
  mod_so.c

列出所有可用的模块:

sudo apachectl -t -D DUMP_MODULES

自己搭建网站,搭建好以后配置也不经常修改,在此记录下操作用到的命令,以备查看。

来自:http://www.codeinfo.top

来自  https://www.cnblogs.com/gzwawj/p/10248180.html






普通分类: