alexfornuto wrote:
It sounds to me like PHP isn't being executed on the server. Start by confirming that you
installed the PHP handler, and
configured Nginx to utilize it.
Yes, those both are done, I double checked it right now.
After reading a bit more, I added following code
Code:
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/test.example.com/public_html$fastcgi_script_name;
}
to my /etc/nginx/conf.d/test.example.com.conf and now I get error 404 when I attempt to load any page.
Edit: Resolved with following /etc/nginx/conf.d/test.example.com.conf
Code:
server {
listen 80;
listen 443 default ssl;
server_name test.example.com;
root /var/www/test.example.com/public_html;
access_log /var/www/test.example.com/logs/access.log;
error_log /var/www/test.example.com/logs/error.log;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}