/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. Spring入门(6)-使用注解装配

    Spring入门(6)-使用注解装配 本文介绍如何使用注解装配. 0. 目录 使用Autowired 可选的自动装配 使用Qualifier选择 1. 使用Autowired package com. ...

  2. [iOS基础控件 - 6.10.6] UIApplicationDelegate & 程序启动过程

    A.概念 1.移动app非常容易受到其他的系统.软件事件的干扰,如来电.锁屏 2.app受到干扰的时候,UIApplication会通知delegate,来代理处理干扰事件 3.delegate可以处 ...

  3. ASP.NET MVC程序传值方式:ViewData,ViewBag,TempData和Session

    转载原地址 http://www.cnblogs.com/sunshineground/p/4350216.html 在ASP.NET MVC中,页面间Controller与View之间主要有以下几种 ...

  4. JS一定要放在Body的最底部么? 聊聊浏览器的渲染机制

    请参看文章 https://segmentfault.com/a/1190000004292479 网上的回答: 1.js加载会阻塞其它内容加载,使页面加载时间更长,尤其是js文件太大,有的页面js文 ...

  5. POJ 1511 - Invitation Cards (dijkstra优先队列)

    题目链接:http://poj.org/problem?id=1511 就是求从起点到其他点的最短距离加上其他点到起点的最短距离的和 , 注意路是单向的. 因为点和边很多, 所以用dijkstra优先 ...

  6. ios 调试

    http://www.cnblogs.com/weilaikeji/p/3306597.html http://www.cnblogs.com/Twisted-Fate/p/4760156.html ...

  7. SQL Server中使用convert进行日期转换

    使用 CONVERT: CONVERT (data_type[(length)],expression[,style]) 参数 expression 是任何有效的 Microsoft® SQL Ser ...

  8. Nuget~让包包带上自己的配置信息

    我们知道一般开发组件之后,组件都有相关配置项,最常见的作法就是把它写到web.config里,而如果你将这个文件直接放到nuget里打包,在进行安装包包时,会提示你这个文件已经存在,不能去覆盖原来的c ...

  9. Banach—steinhaus定理的应用

  10. OC内存管理基础

    OC 内存管理基础 一. retain和release基本使用 使用注意: 1.你想使用(占用)某个对象,就应该让对象的计数器+1(让对象做一次retain操作) 2.你不想再使用(占用)某个对象,就 ...