RT
我的 nginx 配置 /etc/nginx/nginx.conf
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
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 /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
# server {
# listen 80 default_server;
# listen [::]:80 default_server;
# server_name _;
# root /usr/share/nginx/html;
# # Load configuration files for the default server block.
# include /etc/nginx/default.d/*.conf;
# location / {
# }
# error_page 404 /404.html;
# location = /40x.html {
# }
# error_page 500 502 503 504 /50x.html;
# location = /50x.html {
# }
# }
}
/etc/nginx/conf.d/blog.conf
server {
listen 80;
server_name 服务器 ip 地址;
# server_name xxx.com;
access_log /var/log/LandsBlog/access.log;
error_log /var/log/LandsBlog/error.log;
location / {
#include uwsgi_params;
include /etc/nginx/uwsgi_params;
uwsgi_pass 127.0.0.1:8077;
}
#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;
}
location /static/ {
alias /alidata/websites/LandsBLog/LandsBlog/Blog/static/;
index index.html index.htm;
}
location /media/ {
alias /alidata/websites/LandsBLog/LandsBlog/Blog/upload/;
}
}
求解
1
tmackan OP uwsgi.log 的日志:
*** Starting uWSGI 2.0.13.1 (64bit) on [Wed Aug 24 10:42:59 2016] *** compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-4) on 19 August 2016 14:24:34 os: Linux-3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 nodename: iZ230ph83b2Z machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 1 current working directory: /alidata/websites/LandsBLog detected binary path: /root/.virtualenvs/blog/bin/uwsgi uWSGI running as root, you can use --uid/--gid/--chroot options *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** chdir() to /alidata/websites/LandsBLog/LandsBlog your processes number limit is 7283 your memory page size is 4096 bytes detected max file descriptor number: 65535 lock engine: pthread robust mutexes thunder lock: disabled (you can enable it with --thunder-lock) uwsgi socket 0 bound to TCP address :8077 fd 3 Python version: 3.4.1 (default, Aug 19 2016, 10:38:55) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] Set PythonHome to /root/.virtualenvs/blog *** Python threads support is disabled. You can enable it with --enable-threads *** Python main interpreter initialized at 0x1b28a90 your server socket listen backlog is limited to 100 connections your mercy for graceful operations on workers is 60 seconds mapped 507200 bytes (495 KB) for 4 cores *** Operational MODE: preforking *** WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x1b28a90 pid: 3998 (default app) *** uWSGI is running in multiple interpreter mode *** spawned uWSGI master process (pid: 3998) spawned uWSGI worker 1 (pid: 4000, cores: 1) spawned uWSGI worker 2 (pid: 4001, cores: 1) spawned uWSGI worker 3 (pid: 4002, cores: 1) spawned uWSGI worker 4 (pid: 4003, cores: 1) [pid: 4003|app: 0|req: 1/1] 140.205.145.230 () {30 vars in 392 bytes} [Wed Aug 24 10:43:50 2016] GET /check?ip=120.27.202.78_80 => generated 3823 bytes in 35 msecs (HTTP/1.1 404) 2 headers in 80 bytes (1 switches on core 0) 显示已经接受到了请求,并且生成了 bytes 数据啊,但是浏览器还是访问不到。 |
2
tmackan OP uwsgi_proto_uwsgi_parser(): Inappropriate ioctl for device [proto/uwsgi.c line 40]
目前报这个错误 不支持的设备驱动? |
3
tmackan OP 有时候提示:
uwsgi_proto_uwsgi_parser(): Resource temporarily unavailable [proto/uwsgi.c line 40] = =资源暂时不可用 |
4
izoabr 2016-08-26 15:17:33 +08:00
用 proxy_pass 呢
|