Old link I wanted to save.
Setting up a WordPress instance, I need to use PHP-SMTP for email sending. I knew SELinux was giving me grief!
Then to change the settings:
sudo setsebool -P httpd_can_sendmail 1
sudo setsebool -P httpd_can_network_connect 1
Mind your security.
- 1 oz Gin
- 3/4 oz Cointreau
- 1/2 oz Aperol
- 1 oz Lemon Juice
- 1/2 oz Cranberry Syrup
- 2-3 oz Your choice of cider
- Optional garnish: slices of lemon, orange & apple, cranberries
Fill shaker tin w/ice, add gin, Cointreau, Aperol, Lemon Juice, & Cranberry Syrup. Shake well until tin frosts over. Strain into tall glass with ice, top with cider.
- 1 cup frozen/fresh cranberries
- 1/2 cup sugar
- 1/2 cup water
- Combine cranberries, sugar & water in a small saucepan over med/high heat. Bring to a boil, stir to dissolve sugar.
- Reduce heat to low, simmer for 8-10 minutes & strain.
To check if SELinux is running:
To disable SELinux until next reboot:
# setenforce Permissive
Restart Nginx and see if the problem persists. If you would like to permanently alter the settings you can edit /etc/sysconfig/selinux
If SELinux is your problem you can run the following to allow nginx to serve your www directory (make sure you turn SELinux back on before testing this. i.e, # setenforce Enforcing)
# chcon -Rt httpd_sys_content_t /path/to/www
If you’re still having issues take a look at the boolean flags in getsebool -a, in particular you may need to turn on httpd_can_network_connect for network access
# setsebool -P httpd_can_network_connect on
For me it was enough to allow http to serve my www directory.