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)?$ { ...
随机推荐
- Windows Azure Platform (一) 云计算的出现
<Windows Azure Platform 系列文章目录> 最近的一年一直致力于微软云计算技术的推广和研究,对于微软的云计算平台Windows Azure Platform有一定的了解 ...
- LeetCode 232 Implement Queue using Stacks
Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of ...
- 将大数据利用 BCP 导出SqlServer数据到CSV
--导出数据 --BCP [数据库]..[数据库表] out "d:\abc.csv" -c -t "|" -T bcp "SELECT * FROM ...
- ehcache 的配置
配置:一.在src目录下加入ehcache.xml: <cache name="SimplePageCachingFilter" maxElementsInMemory=&q ...
- usb mass storage device
Problem adding USB host device to KVM Windows guest machine. Status: CLOSED CURRENTRELEASE Aliases ...
- ACM OJ Collection
浙江大学(ZJU):http://acm.zju.edu.cn/ 北京大学(PKU):http://acm.pku.edu.cn/JudgeOnline/ 同济大学(TJU):http://acm.t ...
- 怎样提交FIREDAC数据集的DELTA到中间件然后保存进数据库
你可以在客户端序列FireDAC数据集的DELTA , 将序列后的STREAM发送给中间件, 中间件的TFDQuery或TFDMemTable调用LOADFROMSTREAM()方法加载流, 然后调用 ...
- ThinkPHP框架的网站url重写
nginx location / { root /var/www; index index.html index.htm index.php; if (!-e $request_filename) { ...
- HDU 3665 Seaside (最短路,Floyd)
题意:给定一个图,你家在0,让你找出到沿海的最短路径. 析:由于这个题最多才10个点,那么就可以用Floyd算法,然后再搜一下哪一个是最短的. 代码如下: #pragma comment(linker ...
- MVC神韵---你想在哪解脱!(十一)
为了实现这一处理,我们需要在MoviesController类中追加第二个Create方法.这个Create方法具有一个[HttpPost]属性,它意味着我们将要用它来处理提交到“/Movies/Cr ...