ubuntu安装nginx配置反向代理服务器
来源:互联网 发布:网络vip服务器 编辑:程序博客网 时间:2024/05/20 18:51
安装nginx:
sudo apt-get install nginx
启动nginx;
sudo service nginx start
如果报了这样的错误:
[alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)2015/01/16 15:55:46[warn] 1973#0: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1nginx: the configuration file /etc/nginx/nginx.conf syntax is ok2015/01/16 15:55:46 [emerg] 1973#0: open() "/var/run/nginx.pid" failed (13: Permission denied)nginx: configuration file /etc/nginx/nginx.conf test failed
出现上面的情况要么就是文件没创建,要么就是没权限。所以:
先用touch和mkdir创建文件和文件夹。然后在用sudo chmod a+rwx -R 文件路径赋予所有用户所有权限(777)。
最后在nginx.conf文件中的http下加入
upstream myproject(内网映射的地址别名){server 192.168.0.27:80(ip:port);}server{listen 8088;server_name localhost;location / {root html;index index.html index.htm;proxy_pass http://myproject(内网映射地址别名);}}好了,现在使用service nginx start命令启动服务器。然后输入http://localhost:8088看看是不是成功了。
0 0
- ubuntu安装nginx配置反向代理服务器
- nginx安装和配置反向代理服务器
- nginx安装配置 作为反向代理服务器
- nginx反向代理服务器安装、基本配置
- Nginx反向代理服务器安装与配置
- nginx apache 配置反向代理服务器
- 使用Nginx配置反向代理服务器
- Nginx反向代理服务器安装与配置(win)
- ubuntu 代理服务器nginx安装
- nginx反向代理服务器和负载均衡配置
- Nginx.conf配置,nginx作为前端反向代理服务器的配置
- 3.nginx学习笔记:nginx配置反向代理服务器
- Nginx--HTTP反向代理服务器
- nginx作为反向代理服务器
- Nginx反向代理服务器详解
- Nginx搭建反向代理服务器
- Nginx代理服务器反向代理
- nginx反向代理服务器图解
- Stirng字符类型转换
- PCIe 接口 引脚定义 一览表
- unbutu14安装五笔输入法
- 金融安卓工程师
- HDU 5137 How Many Maos Does the Guanxi Worth(最短路径)
- ubuntu安装nginx配置反向代理服务器
- 通过adb把apk安装到系统分区
- 大学生求职常见的问题!
- TrueNorth Chip Mechanism
- java 反射机制
- 消除软硬件鸿沟,芯客网完美支持智能硬件在移动互联时代的爆发
- h2 导出中文 STRINGDECODE 问题
- LeetCode - Single Number II
- iOS 图标alpha问题