Answer the question
In order to leave comments, you need to log in
nginx not seeing php file?
vim /etc/nginx/site-available/my-sit.com
server {
listen 80;
listen 443 ssl;
server_name my-site.local;
root "/var/www/my-site.local/public";
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
.....
<?php
phpinfo();
?>
Answer the question
In order to leave comments, you need to log in
Change these lines
to thisindex index.php index.html index.htm;
Good afternoon! I have the same nonsense, I did the same thing on the link, but everything is exactly the same when I start, the error is true 404 Not Found, when I go to ip or domain name, Nginx gives out "Welcome to nginx!" when going to 192.168.0.100/index.php an error occurred.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question