ubutun中安装nginx
一、安装
sudo wget http://nginx.org/download/nginx-1.4.4.tar.gz
sudo tar zxvf ng。。。。
cd nginx-1.4.4
sudo ./configure
sudo make
sudo make install
--------------------
./configure: error: the HTTP rewrite module requires the PCRE library.
---------------------------------------
解决方法:
安装nginx依赖包运行命令:
sudo apt-get install libssl-dev
sudo apt-get install libpcre3 libpcre3-dev
2014/12/29 05:04:14 [error] 11808#0: open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)
---------------------
listen 85;
#Allow file uploads
client_max_body_size 50M;
location / {
proxy_pass http://10.10.3.99:81;
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
}
}
server {
listen 83;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
proxy_pass http://10.10.3.99:83;
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
}
}
六、让普通用户拥有root权限
sudo vim /etc/sudoers
然后 ggm= All。。。 仿照上面写就可以了
ubutun中安装nginx的更多相关文章
- 在CentOS 7中安装nginx服务器
简要地介绍一下,如何在CentOS 7中安装nginx服务器 下载对应当前系统版本的nginx包(package) # wget http://nginx.org/packages/centos/ ...
- 在win10 docker启动的centos容器中安装nginx
我是在win10机器上搭建了一个docker,在docker启动了centos容器,在centos中安装nginx. 安装配置docker 直接在官网下载docker for windows:http ...
- Windows2012中安装Nginx并创建为Windows服务
安装Nginx 下载windows版nginx (http://nginx.org/download/nginx-1.10.0.zip),之后解压到需要放置的位置(D:\xampp\nginx) 将N ...
- 【Asp.net Core】在 Linux 子系统中安装 nginx 并配置反向代理
上一篇鸟文中,老周已经介绍过在 Ubuntu 子系统中安装 dotnet-sdk 的方法,本文老周给大伙伴们说说安装 nginx 服务,并配置反向代理.同样,老周假设你从来没有用过 Linux,所以老 ...
- Nginx系列篇一:linux中安装Nginx
提示: 如遇到yum或者wget的问题, 请详见--->杂集:更换centos yum源 请详见--->杂集:关于VMware中linux使用NAT模式配置 1.安装nginx需要的环境 ...
- 在linux中安装nginx
linux系统安装在vmware中,首先在主机中利用shell工具与虚拟机连接 1.在linux中查看虚拟机的ip地址 在终端输入 ifconfig 红框里面就是ip地址 2.在主机中打开shell工 ...
- CentOS中安装Nginx
一.背景 最近在写一些自己的项目,用到了nginx,所以自己动手来在Centos7上安装nginx,以下是安装步骤. 二.基本概念以及应用场景 1.什么是nginx Nginx是一款使用C语言开发的高 ...
- CentOS 中安装nginx
Centos6.8 yum 安装 nginx 1:使用yum安装nginx,安装nginx库 [root@hadoop110 //]# rpm -Uvh http://nginx.org/pack ...
- nginx - ubutun下安装nginx(详述编译方法)
一.使用apt命令安装 sudo apt-get install nginx 二.编译方法安装(个人实践方法,具体见官方文档) 1)说明:我使用的虚拟机是64位 ubuntu server14.04, ...
随机推荐
- php基础知识(3)(文件加载include)
文件加载 综述: 有4个文件加载的语法形式(注意,不是函数): include, include_once, require, require_once; 他们的本质是一样的,都是用于加载/引入/ ...
- 读取proc信息的可扩展实现
需求 1. 将内存.线程数等信息注册到zk上进行监控 2. 统计信息,为下一步做负载均衡做准备. 实现 本文只解决问题1. 从网上查询了下,这些信息可以从proc文件系统中获取,如果不知道proc的, ...
- Connecting Physics Bodies
[Connecting Physics Bodies] The kinds of joints you can create in Sprite Kit. You add or remove join ...
- [原创]Devexpress XtraReports 系列 4 创建多栏报表
昨天我们完成了 [原创]Devexpress XtraReports 系列 3 创建主从报表 今天我们继续学习新的一种报表模式:多栏报表.(Demo源码,数据库最后附上) 或许很多人会问什么是多栏报表 ...
- 最精简的IOCP封装
最精简的IOCP封装,DELPHI XE8直接编译通过.Winsock2.pas即使用DELPHI自带的,相信XE7也能编译,或者XE6,XE5也能. 单说Winsock2.pas,我见过无数种版本的 ...
- HDU 1394Minimum Inversion Number(线段树)
题目大意是说给你一个数组(N个),没戏可以将其首部的k(k<N)个元素移动至尾部,这样总共会形成N个序列 现在要求这n个序列中逆序对数最少的那一个序列有多少个逆序对 最初的确是没太多思路,就算知 ...
- HDU1002大数加法
大数加法 c++版: #include <map> #include <set> #include <stack> #include <queue> # ...
- Linux coredump
前面写过通过注册信号处理函数定位SEGV问题.其实Linux coredump机制也是比较好的debug手段. 进程由于某种异常或者bug导致在运行过程中异常退出或者中止,有时会产生一个叫做core的 ...
- 一个可创建读取日志的管理类(可固定创建2M大小的日志文件)
这里,将日志管理基类命名为LogManagerBase(抽象类),具体的不同类型的日志可以通过继承完成.该基类可将日志以每个2M的方式存储起来,并可以读取当前正在使用的日志的所有内容. 要实现该基类, ...
- 【flash】关于flash的制作透明gif的一个小技巧
关于flash的制作透明gif的一个小技巧 或者说是一个需要注意的地方 1.导出影片|gif,得到的肯定是不透明的.2.想要透明背景,必须通过发布.3.flash中想要发布gif动画的话,不能有文字, ...