刚刚在我的 mac (10.9) 上酿造了 nginx 和 php-fpm。我使用了本教程: http ://rtcamp.com/tutorials/mac/osx-brew-php-mysql-nginx/
所以但是当我在 ngix conf 中设置我的第一个“服务器”博客时,总是会下载 php 文件,我在谷歌上找不到任何解决方案。
这是我的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;
}
}
}