Skip to content

Instantly share code, notes, and snippets.

@daopk
Last active August 22, 2020 18:03
Show Gist options
  • Save daopk/9f57ff43b48063eb4ea63a33e08ba188 to your computer and use it in GitHub Desktop.
Save daopk/9f57ff43b48063eb4ea63a33e08ba188 to your computer and use it in GitHub Desktop.
Disable SELinux on CentOS 7+

Fix nginx proxy PHP-FPM Permission denied

[error] 14066#0: *168 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0Unable to open primary script: index.php (Permission denied)" while reading response header from upstream, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/www.sock:"

Steps:

  1. Open the /etc/selinux/config file and set the SELINUX mod to disabled
  2. Save the file and reboot your CentOS system
  3. Check status
sestatus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment