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, ...
随机推荐
- 第二百一十四天 how can I 坚持
今天肯定有需要记录的东西. html表格. table tr rd colspan rowspan, 还有呢.没了. 睡觉,明天石洋要来泛华. 睡觉.
- 【原】Hadoop伪分布模式的安装
Hadoop伪分布模式的安装 [环境参数] (1)Host OS:Win7 64bit (2)IDE:Eclipse Version: Luna Service Release 2 (4.4.2) ( ...
- SQL SERVER安装提示“安装了 Microsoft Visual Studio 2008 的早期版本
工作共遇到的问题记录: 安装Sql Server 2008 R2时提示错误:“此计算机上安装了 Microsoft Visual Studio 2008 的早期版本.请在安装 SQL Server 2 ...
- jy
222 DROP TABLE t_vhl_jy_car; CREATE TABLE t_vhl_jy_car( VEHICLE_JY_CODE ) PRIMARY KEY, VEHICLE_CODE ...
- tomcat的host配置
本机 etc\hosts 首先了解C:\WINDOWS\system32\drivers\etc\hosts文件配置 127.0.0.1 static1.ezsins.com #adoble ps c ...
- SQLCONNECTION使用HTTP通信协议和中间件连接
SQLCONNECTION支持TCP/IP和HTTP两种通信协议和中间件连接.一般地,默认情况下使用TCP/IP协议. HTTP 协议的一个非常重要的优势在于穿越防火墙. SQLCONNECTION使 ...
- 【PAT】1020. Tree Traversals (25)
Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and i ...
- [Mac]ios应用发布流程
准备: 苹果开发者账号 发布: Xcode-product-clean-Archive,将应用上传到https://itunesconnect.apple.com,创建一个新的app版本,填写app相 ...
- My集合框架第一弹 LinkedList篇
package com.wpr.collection; import java.util.ConcurrentModificationException; import java.util.Itera ...
- Spring中的设计模式
[Spring中的设计模式] http://www.uml.org.cn/j2ee/201301074.asp [详解设计模式在Spring中的应用] [http://www.geek521.c ...