nginx.conf出错

来源:12-3 .部署微电影网站

ALOH

2017-08-26

An error occurred.
Sorry, the page you are looking for is currently unavailable.
Please try 
again later.
If you are the system administrator of this resource then you should check 
the error log for details.
Faithfully yours, nginx.
user nginx;
worker_processes 1;
events {
    use epoll;
    worker_connections 1024;
}
http {
    include mime.types;
    default_type application/octet-stream;
    sendfile on;
    keepalive_timeout 65;
    limit_conn_zone $binary_remote_addr zone=addr:5m;
    upstream movie {
        server 127.0.0.1:5001;
    }
    server {
        listen 80;
        server_name localhost;
        location / {
            root html;
            index index.html index.htm;
            proxy_pass http://movie;
        }
        location ~ \.flv$ {
            flv;
            limit_conn addr 4;
            limit_rate 1024k;
            rewrite ^/static/uploads/(.+?).flv$ /movie_project/app/static/uploads/$1.flv permanent;
        }
        location ~ \.mp4$ {
            mp4;
            limit_conn addr 4;
            limit_rate 1024k;
            rewrite ^/static/uploads/(.+?).mp4$ /movie_project/app/static/uploads/$1.mp4 permanent;
        }
        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
            root html;
        }
    }
}

nginx配置后,重新载入nginx.conf就报错了,而且

nohup python manage.py runserver -h 127.0.0.1 -p 5001 &

的结果是

[root@jdu4e00u53f7 movie_project]# nohup python manage.py runserver -h 127.0.0.1 -p 5001 &
[1] 10301
[root@jdu4e00u53f7 movie_project]# nohup: ignoring input and appending output to ‘nohup.out’

[1]+  Exit 1                  nohup python manage.py runserver -h 127.0.0.1 -p 5001


写回答

1回答

rustgopy

2017-08-26

同学,你好,注意http花括号,要成对

0
1
ALOH
截少了一个},pip3没弄好。但访问ip还是报An error occurred. Sorry, the page you are looking for is currently unavailable. Please try again later. If you are the system administrator of this resource then you should check the error log for details. Faithfully yours, nginx.
2017-08-26
共1条回复

Python Flask 构建微电影视频网站

Python 最好用轻量级框架,让你轻松胜任 Python Web 工程师

683 学习 · 663 问题

查看课程