使用 Apache 來限制訪問 Confluence 6 的管理員界面

限制特定的 IP 地址能夠訪問管理員後臺

Confluence 的管理員控制檯界面對整個應用來講是很是重要的,任何人訪問 Confluence 的控制檯不單單能夠訪問 Confluence 安裝實例,同時還能夠訪問整個服務器。咱們能夠限制 Confluence 的管理員控制檯的訪問給真正須要使用的人和使用強密碼的方式。你能夠考慮只有網絡上的部分機器可以訪問 Confluence 的管理員控制檯或者只有內部網絡的機器才能夠訪問控制檯。若是你使用的是 Apache web server,這個限制能夠在 Apache 端進行配置,按照下面的方法進行配置:html

1. 建立一個定義權限的設置

這個文件能夠在 Apache 的配置目錄中或者系統全局目錄中。例如這個配置文件咱們能夠命名爲 "sysadmin_ips_only.conf"。這個配置文件應該包含有下面的內容:web

Order Deny,Allowapache

Deny from All服務器

 

# Mark the Sysadmin's workstation網絡

Allow from 192.168.12.42ide

2. 添加這個文件到你的虛擬主機中

在你的 Apache 虛擬主機(Apache Virtual Host)配置文件中,添加下面的行來限制系統管理員能夠進行的管理操做:spa

這個配置是是基於你已經安裝 Confluence 在 '/confluence' 目錄下。若是你的 Confluence 是安裝在 '/' 下或者其餘的路徑下,僅添加相關的路徑便可。code

<Location /confluence/admin>server

  Include sysadmin_ips_only.confxml

</Location>

<Location /confluence/plugins/servlet/oauth/consumers/list>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/plugins/servlet/oauth/view-consumer-info>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/plugins/servlet/oauth/service-providers/list>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/plugins/servlet/oauth/service-providers/add>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/plugins/servlet/oauth/consumers/add>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/plugins/servlet/oauth/consumers/add-manually>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/plugins/servlet/oauth/update-consumer-info>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/pages/templates/listpagetemplates.action>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/pages/templates/createpagetemplate.action>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/spaces/spacepermissions.action>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/pages/listpermissionpages.action>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/spaces/removespace.action>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/spaces/importmbox.action>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/spaces/viewmailaccounts.action>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/spaces/addmailaccount.action?>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/spaces/importpages.action>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/spaces/flyingpdf/flyingpdf.action>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/spaces/exportspacehtml.action>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/spaces/exportspacexml.action>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/plugins/servlet/embedded-crowd>

  Include sysadmin_ips_only.conf

</Location>

<Location /confluence/plugins/servlet/upm>

  Include sysadmin_ips_only.conf

</Location>

https://www.cwiki.us/display/CONF6ZH/Using+Apache+to+limit+access+to+the+Confluence+administration+interface

相關文章
相關標籤/搜索