mac pro nginx配置
2015-06-04 10:29
477 查看
1,下载pcre包pcre-8.12.tar.gz
sudo tar xvfz pcre-8.12.tar.gz 解压文件
解压完成之后,执行命令
2,下载nginx
3,配置nginx命令
4,nginx命令
重启:nginx -s reload
停止:nginx -s stop
sudo tar xvfz pcre-8.12.tar.gz 解压文件
解压完成之后,执行命令
cd pcre-8.12 sudo ./configure --prefix=/usr/local --enable-utf8 sudo make sudo make install
2,下载nginx
$ tar xvzf nginx-1.2.0.tar.gz $ cd nginx-1.2.0 $ sudo ./configure --prefix=/usr/local/nginx --with-http_ssl_module $ sudo make $ sudo make install
3,配置nginx命令
vim ~/bash_profile
#nginx NGINX_BIN=/usr/local/nginx/sbin PATH=$NGINX_BIN:$PATH
server { listen 80; server_name 127.0.0.1; location / { alias /Users/noahli/workspace/collect/jxl_collect_i1/www/; expires 1d; } location /orgApi/ { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404; proxy_pass https://www.juxinli.com/orgApi/; proxy_redirect default; } }
4,nginx命令
重启:nginx -s reload
停止:nginx -s stop
相关文章推荐
- Nginx_Lua
- nginx 访问日志和错误日志按日切割sh脚本
- linix下的nginx源码安装
- nginx--可扩展数组和数组排序
- Nginx配置文件详细说明
- Nginx Upstream timed out 的解决办法
- Nginx配置文件详细说明
- 解析 Nginx 负载均衡
- nginx访问控制allow、deny
- Nginx安装详解
- centos 配置php-fpm和nginx的通信
- php+nginx+ffmpeg 完成后台截图转码功能
- nginx 重写 rewrite 基础及实例
- nginx的upstream目前支持5种方式的分配
- nginx rewrite 参数和例子
- Nginx 禁止IP访问
- 使用Nginx提供web服务
- (总结)Nginx配置文件nginx.conf中文详解
- Nginx服务器中403 forbidden的错误如何解决
- nginx自动索引主页模块autoindex