Install a LEMP Stack on CentOS 7
Here is a great tutorial for installing a LEMP stack on Linode
https://www.linode.com/docs/web-servers/lemp/lemp-stack-on-centos-7-with-fastcgi/
I did this on Centos 7 and it worked great.
Notes:
1. In your test.php file, remember to replace
$username = "testuser";
$password = "password";
with the username and password you created to login to MariaDB
2. On Centos 7 you need to turn off SELinux or set it to permissive. Otherwise you'll get 'No Input file specified' when you test the web page
If /var/log/nginx/error.log has '[error] 20049#20049: *43 FastCGI sent in stderr: "Unable to open primary script: /var/www/<yourwebsite>.com/test.php (No such file or directory)"
Then you can temporarily set SELinux to permissive by running this command
[root@linuxhost~]# setenforce 0
Then run
[root@linuxhost~]# sestatus
Make sure it says 'Current mode: permissive'
Then test your website again.
To set SELinux back to enforcing , run [root@linuxhost~]# setenforce 1
For more details see:
https://stackoverflow.com/questions/22090350/nginx-unable-to-open-primary-script
https://www.linode.com/docs/web-servers/lemp/lemp-stack-on-centos-7-with-fastcgi/
I did this on Centos 7 and it worked great.
Notes:
1. In your test.php file, remember to replace
$username = "testuser";
$password = "password";
with the username and password you created to login to MariaDB
2. On Centos 7 you need to turn off SELinux or set it to permissive. Otherwise you'll get 'No Input file specified' when you test the web page
If /var/log/nginx/error.log has '[error] 20049#20049: *43 FastCGI sent in stderr: "Unable to open primary script: /var/www/<yourwebsite>.com/test.php (No such file or directory)"
Then you can temporarily set SELinux to permissive by running this command
[root@linuxhost~]# setenforce 0
Then run
[root@linuxhost~]# sestatus
Make sure it says 'Current mode: permissive'
Then test your website again.
To set SELinux back to enforcing , run [root@linuxhost~]# setenforce 1
For more details see:
https://stackoverflow.com/questions/22090350/nginx-unable-to-open-primary-script
Comments
Post a Comment