鍍金池/ 問答/Linux/ Error: INVALID_SERVICE: 'nginx' not amon

Error: INVALID_SERVICE: 'nginx' not among existing services

sudo firewall-cmd --zone=public --add-service=http --permanent
報錯如下:
Error: INVALID_SERVICE: 'nginx' not among existing services
請問這是什么問題。為什么會這樣?有大佬知道嗎

回答
編輯回答
瘋浪

vi /etc/firewalld/services/nginx.xm

<service>
  <short>Nginx</short>
  <description>nginx</description>
  <port protocol="tcp" port="80"/>
</service>
2017年6月26日 11:45