centos7 安装nginx+fastdfs问题

本文详细介绍了Nginx的配置过程,包括在安装包目录下使用./configure命令进行配置的具体参数,如日志路径、临时文件路径及模块加载等。同时,探讨了前后端分离场景下Nginx配置中alias指令的正确使用方法。

参考这个博主文章http://www.cnblogs.com/leechenxiang/p/7091731.html

完成之后最后还得在安装包目录重新配置一次

./configure \
--prefix=/usr/local/nginx \
--pid-path=/var/run/nginx/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--with-http_gzip_static_module \
--http-client-body-temp-path=/var/temp/nginx/client \
--http-proxy-temp-path=/var/temp/nginx/proxy \
--http-fastcgi-temp-path=/var/temp/nginx/fastcgi \
--http-uwsgi-temp-path=/var/temp/nginx/uwsgi \
--http-scgi-temp-path=/var/temp/nginx/scgi \
--add-module=/home/nginxfastdfs/fastdfs-nginx-module/src


//================================================

nginx 配置前后端不在同一台服务器时 ,nginx在前端服务器 ,界面访问web后端产生的日志(在后端服务器)时 用到了alias 指令碰到的问题
location ^~ /t/ {

    alias /www/root/html/new_t/;

   }

nginx的location、root、alias指令用法和区别 

http://www.nginx.cn/4658.html

 

转载于:https://www.cnblogs.com/zk1023/p/8401729.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值