Answer the question
In order to leave comments, you need to log in
Why doesn't php-fpm work on nginx on Mac?
Hello.
installed the necessary mysql\nginx\php stack via brew, the screenshot shows at first that everything works.
created virtual host /usr/local/etc/nginx/servers.hello-wrold.conf
server {
listen 80;
charset utf-8;
server_name hello.loc;
index index.html index.php;
client_max_body_size 1024m;
access_log /usr/local/var/log/nginx/hello.loc.access.log;
error_log /usr/local/var/log/nginx/hello.loc.error.log;
root /Users/pankovalxndr/Sites/hello-world/code;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
if (!-f $request_filename) {
rewrite ^(.*)/index.php$ $1/ redirect;
}
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_send_timeout 21600;
fastcgi_read_timeout 21600;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location = /favicon.png {
log_not_found off;
access_log off;
}
location = /robots.txt {
log_not_found off;
access_log off;
}
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|eot|otf|ttf|woff|woff2)$ {
log_not_found off;
access_log off;
expires 30d;
add_header Cache-Control public;
}
}
Answer the question
In order to leave comments, you need to log in
Show the contents of /usr/local/var/log/nginx/hello.loc.error.log
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question