Moeses
February 5, 2015, 12:01am
1
So the site only shows text only whenever I set debug == false in the local setting otherwise everything is fine. not sure why it is doing this.
this is just my testing server, but this is just one of the issues that I noticed.
this is the error I get when debug is set to false. its almost as if it cant get the images, but I don’t know why
please help
thanks in advance
did this just start happening or did it happen after a upgrade.
can u pose your nginx and supervisor files?
Moeses
February 6, 2015, 12:54am
3
NGINX
Kegbot nginx.conf file
Instructions:
Replace “kegbot.example.com ” with your external host name
Replace “/data/kegbot/www/media” with the path you configured for
MEDIA_ROOT
Replace “/data/kegbot/www/static” with the path you configured for
STATIC_ROOT
Replace “/data/kegbot/www” with that parent directory name.
Replace “:8000” with the port number of the Kegbot application server, if
changed.
upstream kegbot {
server 192.168.1.111:8000;
}
server {
listen 80;
tcp_nopush on;
tcp_nodelay on;
gzip on;
gzip_disable “msie6”;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_vary on;
keepalive_timeout 0;
client_max_body_size 10m;
location / {
proxy_redirect off;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_pass http://moeses.publicvm.com ;
}
location /media/ {
alias /home/moeses/kegbot-data/media/;
access_log off;
log_not_found off;
expires 7d;
add_header pragma public;
add_header cache-control “public”;
}
location /static/ {
alias /home/moeses/kegbot-data/static/;
access_log off;
log_not_found off;
expires 7d;
add_header pragma public;
add_header cache-control “public”;
}
location /robots.txt {
root /home/moeses/kegbot-data/static/;
access_log off;
log_not_found off;
}
location /favicon.ico {
root /home/moeses/kegbot-data/static/;
access_log off;
log_not_found off;
}
}
Moeses
February 6, 2015, 12:55am
4
super
Supervisor configuration for Kegbot server.
Instructions:
Replace “/data/kegbot/kb/bin” with the installed path of the kegbot
programs.
Replace “user=ubuntu” with the username you wish to run the programs.
Edit paths.
Copy to /etc/supervisor/conf.d/kegbot.conf
[group:kegbot]
programs=gunicorn,workers
[program:gunicorn]
command=/home/moeses/kb/bin/gunicorn pykeg.web.wsgi:application -w 3
directory=/home/moeses
user=moeses
autostart=true
autorestart=true
redirect_stderr=true
[program:workers]
command=/home/moeses/kb/bin/kegbot run_workers
directory=/home/moeses
stopasgroup=true
user=moeses
autostart=true
autorestart=true
redirect_stderr=true
Moeses
February 6, 2015, 12:57am
5
so it was doing this before i even got to this step of creating the nginx and super
i never set up my ip in the nginx file. i leave it default. 127.0.0.1:8000
i was just wondering because when mine just showed text i had my nginx set incorrectly.
Moeses
February 6, 2015, 10:27pm
7
if i do change that to 127.0.0.1, will I still be able to manage the server thoruhg its IP address instead of the 127 address? or is all the depended on how i start the server like if i added the IP address when i start it?
you can still access it through its normal IP address. i never start the server manually. by setting the nginx and super it all starts by that. and i can access it by ip address in local intranet and since i let it outside by the firewall or router can access it outside as well.
Moeses
February 7, 2015, 2:40am
9
that did it i believe. Thanks so much for your help!!!
1 Like
good job. awesome that its up and running now.