yum install policycoreutils-python
semanage port -a -t http_port_t -p tcp 8001
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
In httpd-php.conf, add this line.
#
# Set HTTPS environment variable if we came in over secure
# channel.
SetEnvIf x-forwarded-proto https HTTPS=on
haproxy reqadd
http://stackoverflow.com/questions/452375/detecting-https-requests-in-php
frontend ...
...
reqadd X-Forwarded-Proto:\ https
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}