<!-- lang: shell --> ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
<!-- lang: shell --> brew update #更新可安装包的最新信息,建议每次安装前都运行下 brew search pkg_name #搜索相关的包信息 brew install pkg_name #安装包
<!-- lang: shell --> brew search nginx brew install nginx
<!-- lang: shell --> cd /usr/local/etc/nginx/ mkdir conf.d vim nginx.conf vim ./conf.d/default.conf
<!-- lang: shell -->
worker_processes 1;
error_log /usr/local/var/log/nginx/error.log warn;
pid /usr/local/var/run/nginx.pid;
events {
worker_connections 256;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /usr/local/var/log/nginx/access.log main;
port_in_redirect off;
sendfile on;
keepalive_timeout 65;
include /usr/local/etc/nginx/conf.d/*.conf;
}
<!-- lang: shell -->
server {
listen 8080;
server_name localhost;
root /Users/user_name/nginx_sites/; # 该项要修改为你准备存放相关网页的路径
location / {
index index.php;
autoindex on;
}
#proxy the php scripts to php-fpm
location ~ \.php$ {
include /usr/local/etc/nginx/fastcgi.conf;
fastcgi_intercept_errors on;
fastcgi_pass 127.0.0.1:9000;
}
}
<!-- lang: shell --> sudo cp /private/etc/php-fpm.conf.default /private/etc/php-fpm.conf vim /private/etc/php-fpm.conf
<!-- lang: shell --> brew install mysql
<!-- lang: shell --> mysql.server start #启动mysql服务 mysql.server stop #关闭mysql服务
<!-- ~/nginx_sites/index.php --> <?php phpinfo(); ?>
sudo nginx;
sudo nginx -s reload
sudo php-fpm;
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有