Home  >  Article  >  Backend Development  >  Detailed explanation of how to use homebrew to install lnmp on mac

Detailed explanation of how to use homebrew to install lnmp on mac

伊谢尔伦
伊谢尔伦Original
2017-06-28 12:24:361825browse
1. brew install nginx
2. brew install php70
 
3. 配置Nginx
 
①    定义根目录
        root   /usr/local/sk    将这一部分放到server块里面,去掉其他location块里面的root
 
②    nginx + php 整合,只需将 location ~ \.php 这部分注释去掉
 
开启pathinfo模式 只需修改下面两处
 
location ~ \.php(.*)$ {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $1;
    include fastcgi_params;
}
 
关于path_info的配置,网上找了好久,一直没解决,后来看了这哥们的博客终于搞定了,附个连接:
 
 

The above is the detailed content of Detailed explanation of how to use homebrew to install lnmp on mac. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn