Mantis默认为只能够本机访问,若要在局域网内访问则需要修改Apache的配置文件。
打开apache目录(C:\xampp\apache\conf\httpd.conf ),用记事本打开httpd.conf 文件,
插入代码:Listen 192.168.1.101:80,如下:
……
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 127.0.0.1:80
Listen 192.168.1.101:80
我的端口被占用,设置端口号位8081,因此使用如下代码:
……
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 127.0.0.1:80
Listen 192.168.1.101:8081
验证配置是否成功:
在局域网任一电脑中通过IE登录Mantis系统
http:// 192.168.1.101:8081/mantis/login_page.php即可正常访问。
注意:192.168.1.101是电脑服务器的ip地址,需要更改位自己电脑的IP。
查看IP方法如下:
windows图标——>开始——>CMD 进入——>输入ipconfig回车
因此httpd.conf和访问地址中IP修改成172.16.34.85即可实现局域网访问
即:http:// 172.16.34.85:8081/mantis/login_page.php