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

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

伊谢尔伦
Release: 2023-03-11 07:24:02
Original
1876 people have browsed it
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;
}
Copy after login
 
关于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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template