How to start redis server and config nginx to run mediacrush script on CentOS?
Question: I found a MediaCrush open source from here

> <https://github.com/MediaCrush/MediaCrush>

But stuck in last steps. I started the Redis server, use command

> $redis-cli

that received the "PONG" response.

Then used the command

> $celery worker -A mediacrush -Q celery,priority

and after

> python app.py

But it seem that nothing works. I just installed nginx, run it on my IP ok,
but after edit the nginx.conf like a Mediacrush script, then accessing my IP,
nothing happens. So what am I missing here? and how to config nginx server and
start redis server to run this script on CentOS (i can change it to Arch like
them if required)

Thanks!


Answer: I just wanted to run it for fun.. so this may be wrong but what I did after
running the celery daemon was edit the app.py script and manually set the
host, port, and set debug to false. Then I just executed it like any other
python script.

**EDIT** : This may work

    
    
    PORT=8000 gunicorn -w 4 app:app
    

it switches your port to 8000 and runs the gunicron daemon with 4 workers.
both approaches worked for me.

**Edit File:** `./app.py`

    
    
    from mediacrush.app import app
    from mediacrush.config import _cfg, _cfgi
    import os
    app.static_folder = os.path.join(os.getcwd(), "static")
    if __name__ == '__main__':
       # CHANGE THIS LINE TO REFLECT YOUR DATA
       app.run(host=_cfg("debug-host"), port=_cfgi('debug-port'), debug=True)
       # FOR EXAMPLE I CHANGED IT TO THIS
       # app.run(host="92.222.25.245", port=8000, debug=0)
    

Also to start redis i believe you should do `redis-server&` I use the cli to
manually tinker with it.

Btw I did this on linux mint / ubuntu 14.04 / debian

