Ubuntu环境下配置Nginx
/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的更多相关文章
- Ubuntu环境下配置GCC
Ubuntu网络环境下安装GCC及其头文件步骤: 1.Ubuntu环境下配置GCC 刚装好的GCC什么都不能编译,因为没有一些必须的头文件,所以要安装build-essential,安装了这个包会安装 ...
- 在Ubuntu环境下配置NIMH MEG Core Facility之CTF Tools
在Ubuntu环境下配置NIMH MEG Core Facility之CTF Tools 网站有提示: The install script won't work, but you can copy ...
- Ubuntu环境下配置Android Studio【转】
本文转载自:https://www.jianshu.com/p/1f6295f9c955 之前学习Android开发的时候,一直跟各种教程一样,使用的是Eclipse+ADT,主要是比较方便,容易上手 ...
- 在Ubuntu环境下配置Proxmark3(PM3)使用环境
参考资料:PM3官方Wiki 因为国内网络上大多是在Kali系统上使用PM3的教程(链接1.链接2.链接3),而这些教程的步骤对于Ubuntu系统并不完全适用.所以写下本文,记录我个人的安装经历. 本 ...
- ubuntu环境下配置jdk
方法1:修改/etc/profile 文件 /etc/profile:在登录时,操作系统定制用户环境时使用的第一个文件,此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行. 所有用户 ...
- Ubuntu环境下配置darknet
本教程基于Linux物理机进行相关配置,要求物理机中包含N卡且Capbility>=3.0,小于3.0(Fermi架构)只允许配置cuda,不能配置使用Cudnn: 本教程分为: 1.安装NVI ...
- 在已部署好的docker环境下配置nginx项目路径
第一步:申请一个docker连接账号,可以借用putty工具,如果使用sublime,可以下载sftp插件,上传.下载来同步你线上线下的文件: 第二步:修改nginx区域配置文件,在conf文件夹里放 ...
- mac环境下配置nginx
1.建议使用homebrew安装(ruby安装 brew install ruby) ruby -e "$(curl -fsSL https://raw.githubusercont ...
- nginx环境下配置nagios-关于nagios配置文件nginx.conf
接上文:nginx环境下配置nagios-关于nginx.conf 配置如下: ; location ~ .*\.(php|php5)?$ { ...
随机推荐
- es基础操作
在curl 的 url 中 , 问号后台可以加上pretty=true , 可以将返回来的json进行格式化 . 如果es集群中只有一个node , 那么他的集群健康状态是黄色的 , 只需要再加一个n ...
- Java常用命令行工具
命令基于Sun JDK,用于监控和诊断HotSpot的java 虚拟机. 对应的可执行文件位于$JAVA_HOME/bin/下 jps-虚拟机进程状况工具 选项 作用 -q 只输出LVMID,同进程p ...
- 通用FASTREPORT打印模块及接口方法
untFastReport.dfm文件: object frmFastReport: TfrmFastReport OldCreateOrder = False Height = 405 Width ...
- 转载C#中堆(heap)和栈(stack)的区别
转载原地址 http://www.cnblogs.com/wangshenhe/archive/2013/02/18/2916275.html [转]C#堆和栈的区别 理解堆与栈对于理解.NET中的 ...
- C#中的表达式树简介
表达式树是.NET 3.5之后引入的,它是一个强大灵活的工具(比如用在LINQ中构造动态查询). 先来看看Expression类的API接口: using System.Collections.Obj ...
- 【Android】Handler的应用(三):从服务器端分页加载更新ListView
在前面两节中,我们了解了如何从服务器中加载JSON数据. 现在,我们将把服务器中的JSON数据加载更新到ListView. 并且,结合之前博文的 “动态追加分页ListView数据”的相关知识,实现 ...
- ntdll.dll函数原型
/*NTDLL Base Functions*/NTSYSAPI NTSTATUS NTAPI NtAcceptConnectPort( OUT PHANDLE PortHandle, IN PVOI ...
- python 循环
200 ? "200px" : this.width)!important;} --> 介绍 python中有两种循环,分别是for...in循环.while循环:for.. ...
- jquery 绑定省份和城市
前台代码: <asp:DropDownList runat="server" ID="ddlProvince"></asp:DropDownL ...
- vector 与map的下标操作
1.vector的下标操作不会添加元素,只能针对已经存在的元素操作. 2.map的下标操作具有副作用,key不存在,会在map中添加一个具有该key的新元素,新元素的value使用默认构造方法. 3. ...