Run the following command to see if php-fpm is running
netstat -pl | grep php-fpm.sock
Run the following command to see if php-fpm is running
netstat -pl | grep php-fpm.sock
server { listen 80; server_name localhost; location / { root /usr/share/nginx/html; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }
Run the following command to fix the issue.
updatedb
Run the following command s in the given order
yum -y update yum -y install epel-release yum install -y http://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/ius-release-1.0-14.ius.centos7.noarch.rpm yum -y update yum -y install php71u php71u-pdo php71u-mysqlnd php71u-opcache php71u-xml php71u-mcrypt php71u-gd php71u-devel php71u-mysql php71u-intl php71u-mbstring php71u-bcmath php71u-json php71u-iconv php71u-soap php71u-fpm php71u-cli service httpd restart php -v
Edit apache configuration file and modify as follows. As per my installation, configuration file is /etc/httpd/conf/httpd.conf
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>
To
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>
Those who use CentOS 7 , try disabling selinux and save yourself 🙂
Also It can be caused by a number of things, such as:
File Permissions
Fatal Code Errors
Web Server Issues
Run the following command to disable SELinux immediately
setenforce 0
getenforce
The mod_rewrite module is enabled by default on CentOS 7. If you find it is not enabled on your server, you can enable it by editing 00-base.conf file located in /etc/httpd/conf.modules.d/ directory.
vi
/etc/httpd/conf.modules.d/00-base.conf
LoadModule rewrite_module modules/mod_rewrite.so Service httpd restart
Run the following command
sudo yum install -y yum-utils --enablerepo="base"
Issue the following commnds from terminal to sort out the issue.
git rm -r --cached . git add -A git commit -am 'Removing ignored files'