/etc/nginx目录文件下:

drwxr-xr-x   5 root root 4096 Apr 27 12:47 ./
drwxr-xr-x 104 root root 4096 Apr 27 11:54 ../
drwxr-xr-x   2 root root 4096 Feb 12 00:26 conf.d/
-rw-r--r--   1 root root  911 Mar  5  2014 fastcgi_params
-rw-r--r--   1 root root 2258 Mar  5  2014 koi-utf
-rw-r--r--   1 root root 1805 Mar  5  2014 koi-win
-rw-r--r--   1 root root 2085 Mar  5  2014 mime.types
-rw-r--r--   1 root root 5287 Mar  5  2014 naxsi_core.rules
-rw-r--r--   1 root root  287 Mar  5  2014 naxsi.rules
-rw-r--r--   1 root root  222 Mar  5  2014 naxsi-ui.conf.1.4.1
-rw-r--r--   1 root root 1602 Apr 27 12:45 nginx.conf
-rw-r--r--   1 root root  180 Mar  5  2014 proxy_params
-rw-r--r--   1 root root  465 Mar  5  2014 scgi_params
drwxr-xr-x   2 root root 4096 Apr 27 12:46 sites-available/
drwxr-xr-x   2 root root 4096 Apr 27 12:46 sites-enabled/
-rw-r--r--   1 root root  532 Mar  5  2014 uwsgi_params
-rw-r--r--   1 root root 3071 Mar  5  2014 win-utf

修改文件sites-enabled/default

server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html;
index index.html index.htm; # Make site accessible from http://localhost/
server_name localhost; location /api/v1 {
proxy_pass http://127.0.0.1:8080/api/v1;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
} location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
} ...

Ubuntu环境下配置Nginx的更多相关文章

  1. Ubuntu环境下配置GCC

    Ubuntu网络环境下安装GCC及其头文件步骤: 1.Ubuntu环境下配置GCC 刚装好的GCC什么都不能编译,因为没有一些必须的头文件,所以要安装build-essential,安装了这个包会安装 ...

  2. 在Ubuntu环境下配置NIMH MEG Core Facility之CTF Tools

    在Ubuntu环境下配置NIMH MEG Core Facility之CTF Tools 网站有提示: The install script won't work, but you can copy ...

  3. Ubuntu环境下配置Android Studio【转】

    本文转载自:https://www.jianshu.com/p/1f6295f9c955 之前学习Android开发的时候,一直跟各种教程一样,使用的是Eclipse+ADT,主要是比较方便,容易上手 ...

  4. 在Ubuntu环境下配置Proxmark3(PM3)使用环境

    参考资料:PM3官方Wiki 因为国内网络上大多是在Kali系统上使用PM3的教程(链接1.链接2.链接3),而这些教程的步骤对于Ubuntu系统并不完全适用.所以写下本文,记录我个人的安装经历. 本 ...

  5. ubuntu环境下配置jdk

    方法1:修改/etc/profile 文件 /etc/profile:在登录时,操作系统定制用户环境时使用的第一个文件,此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行. 所有用户 ...

  6. Ubuntu环境下配置darknet

    本教程基于Linux物理机进行相关配置,要求物理机中包含N卡且Capbility>=3.0,小于3.0(Fermi架构)只允许配置cuda,不能配置使用Cudnn: 本教程分为: 1.安装NVI ...

  7. 在已部署好的docker环境下配置nginx项目路径

    第一步:申请一个docker连接账号,可以借用putty工具,如果使用sublime,可以下载sftp插件,上传.下载来同步你线上线下的文件: 第二步:修改nginx区域配置文件,在conf文件夹里放 ...

  8. mac环境下配置nginx

      1.建议使用homebrew安装(ruby安装 brew install ruby)   ruby -e "$(curl -fsSL https://raw.githubusercont ...

  9. nginx环境下配置nagios-关于nagios配置文件nginx.conf

    接上文:nginx环境下配置nagios-关于nginx.conf 配置如下: ;          location ~ .*\.(php|php5)?$          {            ...

随机推荐

  1. 设计模式系列 1——StaticFactory(静态工厂),AbstractFactory(抽象工厂)

    本文出自 代码大湿 代码大湿 本系列持续更新,敬请关注. 1 静态工厂 静态工厂介绍: 静态工厂模式可以实现接口封装隔离的原则.在客户端只知接口而不知实现的时候可以使用静态工厂模式. 源码请点击我 角 ...

  2. HDU-4737 A Bit Fun 维护

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4737 题意:给一个数列a0, a1 ... , an-1,令 f(i, j) = ai|ai+1|ai ...

  3. 教你区分LVDS屏线及屏接口定义

    现在碰到液晶屏大多是LVDS屏线,经常碰到什么单6,双6 单8双8.如何区分呢?我以前也不知道,后在网上收集学习后才弄明白方法1数带 “ -”的这种信号线一共有几对,有10对的减2对就是双8,有8对的 ...

  4. Varnish – 高性能http加速器

    Varnish是一款高性能且开源的反向代理服务器和http加速器.与传统的Squid相比,Varnish具有性能更高.速度更快.管理更方便 等诸多优点.作者Poul-Henning Kamp是Free ...

  5. Spring入门(7)-自动检测Bean

    Spring入门(7)-自动检测Bean 本文介绍如何自动检测Bean. 0. 目录 使用component-scan自动扫描 为自动检测标注Bean 1. 使用component-scan自动扫描 ...

  6. WebForm 回传后如何保持页面的滚动位置

    转载自 http://www.cnblogs.com/renjuwht/archive/2009/06/17/1505000.html 默认情况下,ASP.NET页面回传到服务器后,页面会跳回顶部.对 ...

  7. 转载 C#结构体(struct)和类(class)的区别

    转载原地址: http://dotnet.9sssd.com/csbase/art/8 C#结构体和类的区别问题:在C#编程语言中,类属于引用类型的数据类型,结构体属于值类型的数据类型,这两种数据类型 ...

  8. POJ3630Phone List(字典树)

    参考http://s.acmore.net/show_article/show/58 以附上代码 #include<iostream> #include<stdio.h> #i ...

  9. 深度剖析WordPress主题结构(转)

    利用强大的技术,可以把基于wordpress的网站做成各种各样的形式,这除了要求wordpress主题开发人员精通html,PHP,JS,CSS等技术,还需要开发者掌握WordPress主题的框架. ...

  10. ubuntu为IDE(Eclipse WebStorm)添加桌面快捷方式

    在ubuntu15.10环境配置webstorm和eclipse的时候会下载官网上编译好的包, bin目录下面会有一个.sh文件(linux版本), 那么一般情况下,执行 ./sh就会启动IDE, 但 ...