[英]nginx on mac won't run php
just brewed nginx and php-fpm on my mac (10.9). 刚在我的Mac(10.9)上酿造了nginx和php-fpm。 I used this tutorial: http://rtcamp.com/tutorials/mac/osx-brew-php-mysql-nginx/
我使用了本教程: http : //rtcamp.com/tutorials/mac/osx-brew-php-mysql-nginx/
So but when I set up my first "server"-blog in ngix conf, the php-files always will be downloaded, and I don't find any solutions on google. 因此,但是当我在ngix conf中设置我的第一个“服务器”博客时,总是会下载php文件,并且在google上找不到任何解决方案。
Here's my conf: 这是我的conf:
http {
include /usr/local/etc/nginx/sites-enabled/pma.dev.conf;
include /usr/local/Sites/localsites.conf;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8080;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
server {
server_name pma.dev;
listen pma.dev:9090;
location / {
root /usr/local/share/phpmyadmin;
index index.php;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
include fastcgi_params;
}
}
}
You need a fastcgi_pass
directive to tell nginx where your FPM server is running. 您需要一个
fastcgi_pass
指令来告诉Nginx FPM服务器在哪里运行。 Eg. 例如。
fastcgi_pass 127.0.0.1:9000;
if you're running it on port 9000. 如果您在端口9000上运行它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.