#user  nobody;
worker_processes 1; #error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info; #pid logs/nginx.pid; events {
worker_connections 1024;
} http {
include mime.types;
default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on;
#tcp_nopush on; #keepalive_timeout 0;
keepalive_timeout 65; #gzip on; server {
listen 80;
server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / {
root html;
index index.html index.htm;
} #error_page 404 /404.html; # redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
} # proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#} # deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
} # another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias; # location / {
# root html;
# index index.html index.htm;
# }
#} # HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost; # ssl_certificate cert.pem;
# ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on; # location / {
# root html;
# index index.html index.htm;
# }
#} }

一个豆瓣 API 的反向代理配置,旨在解决豆瓣屏蔽小程序请求问题(豆瓣接口 403 问题)的更多相关文章

  1. Nginx 部署、反向代理配置、负载均衡

    Nginx 部署.反向代理配置.负载均衡 最近我们的angular项目部署,我们采用的的是Nginx,下面对Nginx做一个简单的介绍. 为什么选择Nginx 轻:相比于Apache,同样的web服务 ...

  2. nginx反向代理配置

    最近在项目中使用nginx反向代理,根据不同的请求路径,将请求分发到不同服务.下面的示例主要完成如下功能 /prod/路径的请求分发到prod服务 /test/路径的请求分发到test服务 创建文件夹 ...

  3. angular反向代理配置

    Angular-cli 是基于webpack 的一套针对提升angular开发体验的命令行工具. 开发vue的时候,基于webpack的时候当时配置一个反向代理以完全实现前后端分离的体验,既然webp ...

  4. Squid 反向代理配置

    Squid 反向代理配置 1.删除主配置文件重写写入配置 rm -f /etc/squid/squid.conf 2.重新写入配置反向代理 vim /etc/squid/squid.conf # 监听 ...

  5. apache反向代理配置

    apache简单的反向代理配置 Proxypass /api /http://locahost:3000 反向代理-1.jpg

  6. apache 反向代理配置

    配置前资料检查: 1.可以使用的apache 安装apache服务:打开cmd , 在apache的bin目录下执行以下命令 httpd -k install -n apache2.2    其中&q ...

  7. nginx反向代理配置及优化

    nginx反向代理配置及优化前言: 由于服务器apache抗不住目前的并发.加上前端squid配置后,问题依然无法解决.而页面程序大部分是动态.无法使用fastcgi来处理.因此想使用nginx做为反 ...

  8. apache 反向代理配置(ubuntu)

    1.配置apache2的站点文件 cd /etc/apache2/site-avaliable sudo vim edy.conf 具体配置如下: # 反向代理配置 # 监听所有80端口的访问 < ...

  9. nginx反向代理配置实例分享

    nginx反向代理配置一例. 配置内容如下: user www www; worker_processes 8; error_log /usr/local/webserver/nginx/logs/n ...

随机推荐

  1. java与javascript之间json格式数据互转

    javascript中对象与字符串的互转 对象转为字符串:通过JSON.encode方法,这个是json.js里面的方法,引入到当前文件就可以了. 字符串转换为对象:①使用JSON.decode方法, ...

  2. 配置本地git服务器(gitblit win7)

    title: 配置本地git服务器 date: 2017年3月7日22:43:14 gitblit(不用安装) 进入gitblit-1.8.0\data下,编辑gitblit.properties和d ...

  3. Linux 之CentOS7使用firewalld打开关闭防火墙与端口

    一.firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status f ...

  4. listcontrol 加combobox实现

    头文件 #pragma once#include "D:\Work\山东项目\StandardizedDrawing\sdUtils\CSGrid.h"#include " ...

  5. 16.1 foreach 循环中捕获变量的变化

    在 foreach 循环内的匿名函数(通常为Lambda表达式)中捕获循环 变量时要格外小心.代码清单16-1就展示了这样一个简单的示例,它看上去似乎会输出 x . y . z . string[] ...

  6. CentOS / RHEL 7 : Chrony V/s NTP (Differences Between ntpd and chronyd)

    CentOS / RHEL 7 : Chrony V/s NTP (Differences Between ntpd and chronyd) Chosing between Chrony and N ...

  7. =、==、is、id(内容)

    = 赋值 == 比较值是否相等 is 比较.比较的是内存地址 id(内容) 测出内存地址

  8. -------------Django-----URLS路由

    一.相约Django. 1.Django的特点:Django定义了服务分布.路由映射.模板编程.数据处理的一套完整的功能. (1)集成数据访问组件:Django的model层自带数据库ORM组件. ( ...

  9. 【5】Django项目配置settings.py详解

    夫唯不争,故天下莫能与之争 --老子<道德经> 本节内容 1.项目配置文件settings.py介绍 2.数据库配置[MySQL] 3.创建模型对象并和数据库同步 4.python官方提供 ...

  10. python库文件路径

    python中import语句导入库文件路径可通过sys.path查看.写一个简单的小程序: import sys print sys.path 运行它,本机上得到的结果如下: ['', '/usr/ ...