Skip to content

Commit

Permalink
Changes to config files to accomodate new direcotry structure
Browse files Browse the repository at this point in the history
  • Loading branch information
matachi committed Jun 15, 2014
1 parent b4ef4d2 commit d7cbde6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
15 changes: 12 additions & 3 deletions conf/nginx.conf
@@ -1,5 +1,11 @@
upstream hydra {
server unix:/hydra/mysite.sock;
server unix:/home/deploy/hydra/mysite.sock;
}

server {
listen 80;
server_name www.matachi.se;
return 301 http://matachi.se$request_uri;
}

server {
Expand All @@ -11,14 +17,17 @@ server {
client_max_body_size 75M;

location /media {
alias /hydra/media;
alias /home/deploy/hydra/media;
}

location /static {
alias /hydra/static;
alias /home/deploy/hydra/static;
expires 30d;
log_not_found off;
}

location / {
add_header Content-Security-Policy "default-src http://matachi.se/static/; script-src 'self' http://fonts.googleapis.com http://code.jquery.com http://netdna.boostrapcdn.com https://gist.github.com/MaTachi/; style-src 'self' http://fonts.googleapis.com https://gist.github.com/assets/embed http://netdna.bootstrapcdn.com/font-awesome/; font-src http://netdna.bootstrapcdn.com/font-awesome/ http://themes.googleusercontent.com; frame-src https://www.facebook.com/ https://platform.twitter.com";
uwsgi_pass hydra;
include /etc/nginx/uwsgi_params;
}
Expand Down
16 changes: 8 additions & 8 deletions conf/uwsgi.ini
Expand Up @@ -2,11 +2,11 @@

# Django-related settings
# The base directory
chdir = /hydra
chdir = /home/deploy/hydra
# Django's wsgi file
module = hydra.wsgi
# The virtualenv
home = /hydra/env
home = /home/deploy/hydra/env

env = DJANGO_SETTINGS_MODULE=hydra.settings

Expand All @@ -16,14 +16,14 @@ master = true
# Maximum number of worker processes
processes = 4
# The socket
socket = /hydra/mysite.sock
socket = /home/deploy/hydra/mysite.sock
# Permissions
chmod-socket = 600
chown-socket = www-data
uid = www-data
gid = www-data
chown-socket = deploy
uid = deploy
gid = deploy
# Clear environment on exit
vacuum = true

daemonize = /var/log/uwsgi/log.log
pidfile = /hydra/mysite.pid
daemonize = /home/deploy/uwsgi/log/hydra.log
pidfile = /home/deploy/hydra/mysite.pid

0 comments on commit d7cbde6

Please sign in to comment.