My nginx and php-fpm all have to start. But still error, Google still no fruit, omnipotent community, help Ah!
View information
The configuration file is as follows:
The error message is as follows:
Reply content:
My nginx and php-fpm all have to start. But still error, Google still no fruit, omnipotent community, help Ah!
View information
The configuration file is as follows:
The error message is as follows:
It is recommended that you set a domain name for each project directory
sudo vi /etc/hosts//添加127.0.0.1 demo.dev
Open/usr/local/etc/nginx/servers
Then create a new configuration file for example demo.conf content as follows:
server { listen 80; server_name demo.dev; #域名 root /Users/程序目录; #程序目录 index index.html index.php; # 伪静态 #location / { # try_files $uri $uri/ /index.php$is_args$query_string; #} location ~ \.php$ { try_files $uri =404; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }}
Restart Nginx, browser access Demo.dev is done
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
Give it a try.
server { listen 80; server_name localhost; root /path; #注意这里配置为你的网站根目录 index index.html index.htm index.php; location / { #try_files $uri $uri/ /index.php$is_args$args; } location ~ \.php$ { try_files $uri =404; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; }}
It is advisable to vagrant the LNMP environment on the Mac. Baidu has a lot of solutions