linux防火墙开启

https://www.cnblogs.com/yizhipanghu/p/11171211.html
安装的服务器 用curl 试试在本地是否能打开,外网打不开时,可能防火墙原理
然后重启防火墙

iptables:
https://blog.csdn.net/dhjibk/article/details/80633776
防火墙(firewalld与iptables)firewalld较新https://blog.csdn.net/weixin_40658000/article/details/78708375

宁愿关闭防火墙也不要卸载防火墙 !!! 机子会死

windows系统中 tomcat运行项目 其中

System.getProperty(“user.dir”) 输出的位置是当前tomcat所在的位置的bin目录
linux

System.getProperty(“user.dir”)输出的位置是当前tomcat所在位置webapps目录里

————————————————
版权声明:本文为CSDN博主「wwq_vracle」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/wwq_vracle/article/details/81774208

反正我用的是Thread.currentThread().getContextClassLoader().getResource("").getPath(); 这个肯定在类文件下面

Sets the default security model of the Apache2 HTTPD server. It does

# not allow access to the root filesystem outside of /usr/share and /var/www.               # 看见这句话没有 //这句话说以下设置禁止了其他的根目录
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
    Options FollowSymLinks
    AllowOverride None
        Require all denied
</Directory>

DocumentRoot:"${SRVROOT}/htdocs/tp5/public/"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值