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)?$ { ...
随机推荐
- Android JNI之C/C++层调用JAVA
转载请声明:原文转自:http://www.cnblogs.com/xiezie/p/5930032.html 从C/C++层调用JAVA层代码步骤: 1. 在JAVA类中创建java方法和本地方法 ...
- 软件工程——PairProject
结对编程组员: 马辰 11061178 柴泽华 11061153 1) 照至少一张照片, 展现两人在一起合作编程的情况. 结对编程的优点 1)在编程过程中,任何一段代码都不断地复审,同 ...
- ecstore b2b2c 商城页面伪静态代码 及相关注意事项
一下代码需要添加到 nginx.conf配置文件的server块,阿里云虚拟机一般在conf文件夹下建立vhost文件夹,把server块放进去,然后 在nginx.conf使用include 包含进 ...
- 转载Repository 和Unit of work的使用说明
利用Repository and Unit of Work重构项目 文章索引和简介 项目最基础的东西已经结束了,但是现在我们的项目还不健全 不利于测试 重复性代码多 层与层之间耦合性高 不利于 ...
- ASP.NET forms凭据设置和跳转的几种方法
string user = "userName"; //默认的第1种,超时时间是在web.cofig中forms设置的timeout,单位是分钟,生成的cookie和凭证超时时间一 ...
- .net版本之间的关系
net framework 2.0,3.0与3.5三个版本之间关系如下: .net framework 2.0 = CLR 2.0 + FCL(framework class library) .ne ...
- [c++]this指针理解
#include <iostream> using namespace std; /** * this 指针理解 */ class A{ int i; public: void hello ...
- MyEclipse10.7的 at com.genuitec.eclipse.ast.deploy.core.Deployment.<init>
前两天由于换了MyEclipse新版本之后,我的MyEclipse的Servers就不能正常使用了,也就是不能发布Web项目了.出现了空指针的异常,并产生了这个错误: atcom.genuitec ...
- CustomerSOList
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...
- Git Cmd
http://my.oschina.net/sunboy2050/blog/55749