File tree 4 files changed +62
-0
lines changed
4 files changed +62
-0
lines changed Original file line number Diff line number Diff line change 127
127
# https://docs.djangoproject.com/en/1.9/howto/static-files/
128
128
129
129
STATIC_URL = '/static/'
130
+ STATIC_ROOT = os .path .join (BASE_DIR , 'static' )
130
131
131
132
MEDIA_ROOT = os .path .join (BASE_DIR , 'media' )
132
133
MEDIA_URL = '/media/'
Original file line number Diff line number Diff line change
1
+ # ide_nginx.conf
2
+
3
+ # the upstream component nginx needs to connect to
4
+ upstream django {
5
+ server 127.0.0.1:8000; # for a web port socket (we'll use this first)
6
+ }
7
+
8
+ # configuration of the server
9
+ server {
10
+ # the port your site will be served on
11
+ listen 80;
12
+ # the domain name it will serve for
13
+ server_name 54.163.53.189; # substitute your machine's IP address or FQDN
14
+ charset utf-8;
15
+
16
+ # max upload size
17
+ client_max_body_size 75M; # adjust to taste
18
+
19
+ # Django media
20
+ location /media {
21
+ alias /home/ubuntu/viraj/IDE/media; # your Django project's media files - amend as required
22
+ }
23
+
24
+ location /static {
25
+ alias /home/ubuntu/viraj/IDE/static; # your Django project's static files - amend as required
26
+ }
27
+
28
+ # Finally, send all non-media requests to the Django server.
29
+ location / {
30
+ uwsgi_pass django;
31
+ include /home/ubuntu/viraj/IDE/uwsgi_params; # the uwsgi_params file you installed
32
+ }
33
+ }
Original file line number Diff line number Diff line change
1
+ [uwsgi]
2
+
3
+ chdir = /home/ubuntu/viraj/IDE
4
+ wsgi-file = /home/ubuntu/viraj/IDE/ide/wsgi.py
5
+ master = true
6
+ processes = 10
7
+ socket = 0.0.0.0:8000
8
+ vaccum = true
9
+ python-autoreload = 1
10
+ # buffer-size=32768
11
+ daemonize = /var/log/uwsgi/ide.log
12
+
Original file line number Diff line number Diff line change
1
+ uwsgi_param QUERY_STRING $query_string;
2
+ uwsgi_param REQUEST_METHOD $request_method;
3
+ uwsgi_param CONTENT_TYPE $content_type;
4
+ uwsgi_param CONTENT_LENGTH $content_length;
5
+
6
+ uwsgi_param REQUEST_URI $request_uri;
7
+ uwsgi_param PATH_INFO $document_uri;
8
+ uwsgi_param DOCUMENT_ROOT $document_root;
9
+ uwsgi_param SERVER_PROTOCOL $server_protocol;
10
+ uwsgi_param HTTPS $https if_not_empty;
11
+
12
+ uwsgi_param REMOTE_ADDR $remote_addr;
13
+ uwsgi_param REMOTE_PORT $remote_port;
14
+ uwsgi_param SERVER_PORT $server_port;
15
+ uwsgi_param SERVER_NAME $server_name;
16
+
You can’t perform that action at this time.
0 commit comments