linux apapche想改变访问端口

来源:互联网 发布:linux目录及其文件权限 编辑:程序博客网 时间:2024/06/12 00:32
报错:
Starting httpd: (13)Permission denied: make_sock: could not bind to address [::]:88(13)Permission denied: make_sock: could not bind to address 0.0.0.0:88no listening sockets available, shutting downUnable to open logs解决方法:

I happened to run into this problem because of missing SELinux permissions. By default, SELinux only allowed apache/httpd to bind to the following ports:

80, 81, 443, 488, 8008, 8009, 8443, 9000

So binding to my httpd.conf-configured Listen 88 HTTP port and config.d/ssl.conf-configured Listen 8445 TLS/SSL port would fail with that default SELinux configuration.

To fix my problem, I had to add ports 88 and 8445 to my system's SELinux configuration:

  1. Install semanage tools: sudo yum -y install policycoreutils-python
  2. Allow port 88 for httpd: sudo semanage port -a -t http_port_t -p tcp 88
  3. Allow port 8445 for httpd: sudo semanage port -a -t http_port_t -p tcp 8445

0 0
原创粉丝点击