Django 1.7 使用 uwsgi + Nginx

nginx + uWSGI  部署 django

安装 uwsgi

pip install uwsgi

#需要事先安装好 pip

创建uwsgi配置文件 uwsgi.ini

[uwsgi]
chdir=/path/to/your/project
module=mysite.wsgi:application
master=True
pidfile=/tmp/project-master.pid
vacuum=True
max-requests=5000
daemonize=/var/log/uwsgi/yourproject.log

详细参数配置参考:http://uwsgi-docs.readthedocs.org/en/latest/Configuration.html

启动服务

uwsgi --ini uwsgi.ini

nginx 中配置

server {
        listen       80;
    #    listen       somename:80;
        server_name  somename.com;

        location / {
            root   html;
            index  index.html index.htm;
            uwsgi_pass   127.0.0.1:3001;
            include     uwsgi_params;
        }
    }

 

19 Comments

  1. FrankKnomo

    When it Functions Laissez faire usually is most effective on competitors with superior seniority and proficiency. Open communication and clear requirements and ambitions are essential for this design to succeed. A who leaves his party floundering with small contact and cloudy expectations has failed while in the laissez faire leadership style. In the event the class members are not highly-skilled, or should they do not grasp everything you assume of these, laissez-faire management can crash. Before you exercise laissez-faire management, look at the requirements of one’s downline. If, however, your associates are independent, reputable, and process-oriented, laissez faire control is a possible alternative. As an example, the transformational management type is one where the boss motivates her crew with a typical vision. The democratic chief permits team members to assist play a part inside the decision-making procedure.
    essay writer

    Reply
  2. managed it services austin

    Hello there! I know this is somewhat off topic but I was wondering if you knew where I could get a captcha plugin for my comment form? I’m using the same blog platform as yours and I’m having difficulty finding one? Thanks a lot!

    Reply
  3. Travel International

    Very nice post. I just stumbled upon your blog and wanted to say that I’ve really enjoyed browsing your blog posts. After all I’ll be subscribing to your rss feed and I hope you write again very soon!

    Reply
  4. Education

    I like this website very much, Its a really nice situation to read and get information. “There is no exercise better for the heart than reaching down and lifting people up.” by John Andrew Holmes.

    Reply
  5. Education

    Magnificent site. Lots of helpful info here. I’m sending it to a few friends ans additionally sharing in delicious. And of course, thanks on your sweat!

    Reply
  6. Education

    I think this is among the most important info for me. And i’m glad reading your article. But wanna remark on some general things, The site style is perfect, the articles is really great : D. Good job, cheers

    Reply
  7. Education

    you are in point of fact a excellent webmaster. The web site loading pace is incredible. It seems that you are doing any unique trick. Moreover, The contents are masterwork. you have done a great process in this topic!

    Reply
  8. fire

    There’s certainly a lot to learn about this topic. I like all of the points you made.|

    Reply
  9. Education

    Thank you for the sensible critique. Me & my neighbor were just preparing to do a little research on this. We got a grab a book from our area library but I think I learned more from this post. I am very glad to see such great info being shared freely out there.

    Reply
  10. visit website

    I truly appreciate this post. I?аАТ’аЂа†ve been looking everywhere for this! Thank goodness I found it on Bing. You ave made my day! Thanks again

    Reply
  11. Education and Training

    Normally I don’t learn post on blogs, but I wish to say that this write-up very forced me to check out and do so! Your writing taste has been surprised me. Thanks, quite nice article.

    Reply
  12. buy automatic instagram likes

    Im grateful for the blog article.Really looking forward to read more. Really Cool.

    Reply
  13. islam videos

    Say, you got a nice blog post.Much thanks again. Really Great.

    Reply
  14. Travel International

    Useful info. Lucky me I discovered your web site unintentionally, and I’m surprised why this coincidence didn’t came about earlier! I bookmarked it.

    Reply
  15. Car & Automotive

    Wow, fantastic blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your website is magnificent, let alone the content!

    Reply
  16. Car & Automotive

    I am constantly looking online for articles that can help me. Thanks!

    Reply
  17. Car & Automotive

    you’re actually a just right webmaster. The website loading speed is amazing. It kind of feels that you are doing any distinctive trick. Also, The contents are masterpiece. you’ve performed a wonderful job on this topic!

    Reply
  18. Education and Training

    Only wanna input on few general things, The website layout is perfect, the written content is real excellent : D.

    Reply
  19. jonsered chainsaw

    Thanks so much for the post.Thanks Again. Much obliged.

    Reply

Leave a Comment

电子邮件地址不会被公开。 必填项已用*标注