nginx / sites / enabled上的夹层部署问题

时间:2015-08-05 09:15:10

标签: django nginx cron web-deployment mezzanine

我是Django和Mezzanine的新手,我正在尝试将我的测试项目部署到远程服务器。这是结构脚本:

FABRIC = {                                                                                                                                                                             
"DEPLOY_TOOL": "git",  # Deploy with "git", "hg", or "rsync"
"SSH_USER": "user", # SSH username for host deploying to
"SSH_PASS":  "pass", # SSH password (consider key-based authentication)
"HOSTS": "000.000.000.000", # List of hosts to deploy to (eg, first host)
"DOMAINS": ALLOWED_HOSTS, # Domains for public site
"VIRTUALENV_HOME":  "/home/user/testproj", # Absolute remote path for virtualenvs
"PROJECT_NAME": "testproj", # Unique identifier for project
"REPO_URL": "git@bitbucket.org:user/testproj.git", # Git or Mercurial remote repo URL for the project
"LIVE_HOSTNAME": "example.com", # Host for public site.
"REQUIREMENTS_PATH": "requirements.txt", # Project's pip requirements
"GUNICORN_PORT": 8000, # Port gunicorn will listen on
"LOCALE": "en_US.UTF-8", # Should end with ".UTF-8"
"DB_PASS": "pass", # Live database password
"ADMIN_PASS": "user", # Live admin user password
"SECRET_KEY": SECRET_KEY,
"NEVERCACHE_KEY": NEVERCACHE_KEY,

}

然后在shell和安装中启动fab all。在安装过程中,我有以下错误。无法弄清楚,出了什么问题:(

------
deploy                                                                                                                                                                                 
------                                                                                                                                                                                 

[000.000.000.000] put: <file obj> -> /etc/cron.d/testproj                                                                                                                         

$ chown root /etc/cron.d/testproj  ->


$ chmod 600 /etc/cron.d/testproj  ->

[000.000.000.000] put: <file obj> -> /etc/nginx/sites-enabled/testproj.conf                                                                                                       

Fatal error: put() encountered an exception while uploading '<StringIO.StringIO instance at 0x7faa5ffa55a8>'                                                                           

Underlying exception:                                                                                                                                                                  
    'ascii' codec can't decode byte 0xe2 in position 203: ordinal not in range(128)                                                                                                    

Aborting.                                                                                                                                                                              
Disconnecting from 000.000.000.000... done.

1 个答案:

答案 0 :(得分:0)

我在nginx目录中用mkdir sites-enabled解决了它