日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Python編程在Nginx中的使用方法

Python編程在平時使用的時候有不少知識需要我們詳細的學習。下面我們就看看如何進行相關(guān)技術(shù)信息的相關(guān)學習。希望大家有所幫助。首先確定有了Python編程的頭文件(/usr/include/Python2.5)

創(chuàng)新互聯(lián)專注于喀喇沁網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗。 熱誠為您提供喀喇沁營銷型網(wǎng)站建設(shè),喀喇沁網(wǎng)站制作、喀喇沁網(wǎng)頁設(shè)計、喀喇沁網(wǎng)站官網(wǎng)定制、微信小程序服務(wù),打造喀喇沁網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供喀喇沁網(wǎng)站排名全網(wǎng)營銷落地服務(wù)。

沒有的話 sudo apt-get install Python2.5-dev

1.Nginx安裝

 
 
 
  1. $ ./configure --add-module=/path/to/mod_wsgi/ --prefix=/usr/local/nginx   
  2. $ make && make install 

2.mod_wsgi安裝

 
 
 
  1. $ cd mod_wsgi-0.0.6/   
  2. $ sudo Python setup.py --prefix=/usr/local/nginx --conf-path=/usr/local/nginx/conf --sbin-path=/usr/local/nginx/sbin  

修改Nginx.conf文件

 
 
 
  1. #user nobody;  
  2. worker_processes 4;  
  3. error_log logs/error.log info;  
  4. pid logs/nginx.pid;  
  5. events {  
  6. use epoll; #linux2.6+  
  7. worker_connections 2048;  
  8. }  
  9. env HOME;  
  10. env PythonPATH=/data/應用目錄;  
  11. env Python_EGG_CACHE=/tmp;  
  12. http {  
  13. include conf/mime.types;  
  14. default_type application/octet-stream;  
  15. sendfile on;  
  16. keepalive_timeout 65;  
  17. gzip off;  
  18. wsgi_Python_optimize 2;  
  19. wsgi_Python_executable /usr/bin/Python;  
  20. #wsgi_Python_home /usr;  
  21. #wsgi_enable_subinterpreters on;  
  22. server {  
  23. listen 80;  
  24. server_name localhost;  
  25. include conf/wsgi_vars;  
  26. #wsgi_middleware wsgiref.validate validator;  
  27. #wsgi_middleware paste.lint;  
  28. location / {  
  29. root /data/boss_admin/;  
  30. }  
  31. location /do {  
  32. #client_body_buffer_size 50;  
  33. wsgi_pass /data/應用目錄/nginx.py;  
  34. wsgi_pass_authorization off;  
  35. wsgi_script_reloading on;   
  36. wsgi_use_main_interpreter on;  
  37. }  
  38. }  

以上就是對Python編程的詳細介紹希望大家在以后的使用中有所幫助。


本文題目:Python編程在Nginx中的使用方法
網(wǎng)站地址:http://www.dlmjj.cn/article/dhgcsci.html