Service and policy excerpts
code$ sudo nginx -t
syntax is ok
test is successful
$ sudo systemctl reload nginx
$ sudo ss -lntp | grep ':8186'
<no output>
$ getenforce
Enforcing
$ sudo tail -n 1 /var/log/nginx/error.log
[emerg] 2417#2417: bind() to 127.0.0.1:8186 failed (13: Permission denied)
$ sudo ausearch -m AVC -ts recent | tail -n 1
type=AVC avc: denied { name_bind } for pid=2417 comm="nginx" src=8186 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=tcp_socket permissive=0
$ sudo semanage port -l | grep '^http_port_t'
http_port_t tcp 80, 443, 8080