greening install

q

  1. free httpd 8001 port when using selinux
    yum install policycoreutils-python
    semanage port -a -t http_port_t -p tcp 8001
    
  2. selinux開啟httpd連接network network_db

    錯誤訊息:could not connect to server: Permission denied Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?

    setsebool -P httpd_can_network_connect_db 1
    setsebool -P httpd_can_network_connect 1
    
  3. /etc/httpd/conf.d/php.conf SetEnvIf
  4. haproxy reqadd

  5. apache http server force http redirect to https