2017-12-23 2 views
0

다른 개발자의 django 프로젝트를 받았습니다. 그것은 Windows 서버 (Django + fastcgi + nginx)를 기반으로합니다. settings.py에서 선물 옵션 DEBUG = 진정한하지만 오류 로그 - 파일의 사람이 서버 실행Django + fastcgi + nginx 로깅

worker_processes auto; 
error_log C:/PATH_TO_PROJECT/nginx/logs/error.log; 
error_log C:/PATH_TO_PROJECT/nginx/logs/error.log notice; 
error_log C:/PATH_TO_PROJECT/nginx/logs/error.log info; 
error_log C:/PATH_TO_PROJECT/nginx/logs/error.log error; 

events { 
    worker_connections 1024; 
} 
http { 
    include  mime.types; 
    default_type application/octet-stream; 
    sendfile  on; 
    keepalive_timeout 65; 
    server { 
     listen  8080; 
     server_name localhost; 
     client_max_body_size 32m; 
     error_log C:/PATH_TO_PROJECT/nginx/logs/db-rlocalhost.error_log; 
     error_log C:/PATH_TO_PROJECT/nginx/logs/db-rlocalhost.error_log notice; 
     error_log C:/PATH_TO_PROJECT/nginx/logs/db-rlocalhost.error_log info; 
     error_log C:/PATH_TO_PROJECT/nginx/logs/db-rlocalhost.error_log error; 

     location/{  
      fastcgi_pass 127.0.0.1:8888; 
      fastcgi_pass_header Authorization; 
      fastcgi_hide_header X-Accel-Redirect; 
      fastcgi_hide_header X-Sendfile; 
      fastcgi_pass_header Authorization; 
      fastcgi_intercept_errors off; 
      fastcgi_param  CONTENT_LENGTH $content_length; 
      fastcgi_param  CONTENT_TYPE $content_type; 
      fastcgi_param  PATH_INFO  $fastcgi_script_name; 
      fastcgi_param  QUERY_STRING $query_string; 
      fastcgi_param  REMOTE_ADDR  $remote_addr; 
      fastcgi_param  REQUEST_METHOD $request_method; 
      fastcgi_param  REQUEST_URI  $request_uri; 
      fastcgi_param  SERVER_NAME  $server_name; 
      fastcgi_param  SERVER_PORT  $server_port; 
      fastcgi_param  SERVER_PROTOCOL $server_protocol; 
     } 
     location /media/ { 
      alias H:/AUCTION/; 
     } 
     location /static/ { 
      alias C:/PATH_TO_PROJECT/static/; 
     } 
     location /static_ac_invoice/ { 
      alias C:/PATH_TO_PROJECT/tender/ac_invoice/static/; 
     } 
     error_page 500 502 503 504 /50x.html; 
     location = /50x.html { 
      root html; 
     } 
    } 
} 

nginx.conf 정보 디버깅 포함되어 있지 않습니다

c:\PATH_TO_PROJECT\Scripts\python.exe c:\PATH_TO_PROJECT\tender\manage.py runfcgi method=threaded host=127.0.0.1 port=8888 
C:\PATH_TO_PROJECT\nginx\nginx.exe 

어떻게을 내가 fastcgi 모드에서 실행되지 않은 프로젝트를 재구성하지 않고 디버그 정보를 얻었습니까?

답변

0
python manage.py runfcgi method=threaded host=127.0.0.1 port=8888 daemonize=false 

이제 디버그 정보를 볼 수 있습니다.

key daemonize = false가 도움말 출력 manage.py에없는 이유는 무엇입니까?

+0

그것은''1.8 docs' (https://docs.djangoproject.com/en/1.8/howto/deployment/fastcgi/#examples)에서와 같이 runfcgi 플래그입니다.) – Jason

+0

프로젝트가 사용 중입니다. ( – Skif

+0

아직도 적용 – Jason