我在我的 ubuntu 伺服器 tomcat 上運行。我可以啟動服務root
並可以存取我的伺服器localhost:8443
。tomcat
我做了什麼 :
一、我先加入用戶tomcat:
adduser tomcat ;addgroup tomcat
二.然後我將服務設定/etc/systemd/tomcat.service
從 root 更改為:
[Service]
user=tomcat
group=tomcat
三.更改了我的 tomcat 資料夾的權限/tomcat
:
chown tomcat:tomcat /tomcat -R
chmod 755 /tomcat
netstate -nlp
埠 8080、8443 -> 良好
iptables -L -v
沒有遺失的文件 -> 好
service started
作為 tomcat -> 好
但我仍然無法連接到伺服器。如果我將user
,更改group
為 tomcat.service 的根目錄,我將到達伺服器。
我不知道問題出在哪裡。
如果有專家可以幫助我,我將不勝感激。
親切的問候
鬍鬚黑