Browse Source

Add nginx configuration for static files

prieto 8 years ago
parent
commit
e1352fccb7
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      README

+ 2
- 1
README View File

@@ -150,7 +150,8 @@ Mass deployments tricks & tips:
150 150
 	# FOLLOWING INSTRUCTIONS ARE FOR STANDALONE LODEL2 WEBSERVER
151 151
 	
152 152
 	#Configure nginx & restart it
153
-	echo -e "server {\n\tlisten 80 default_server;\n\tlisten [::]:80 default_server;\n\tlocation / {\n\t\tproxy_pass http://127.0.0.1:1337/;\n\t}\n}\n" > /etc/nginx/sites-enabled/default
153
+	export lodel2_install_dir="/usr/lib/python3/dist-packages";
154
+	echo -e "server {\n\tlisten 80 default_server;\n\tlisten [::]:80 default_server;\n\tlocation / {\n\t\tproxy_pass http://127.0.0.1:1337/;\n\t}\n\t\n\tlocation /static/ {\n\t\talias $lodel2_install_dir/lodel/plugins/webui/templates;\n\t}\n\t\n}\n" > /etc/nginx/sites-enabled/default
154 155
 	/etc/init.d/nginx restart
155 156
 	#Build dyncode for instances
156 157
 	slim -a -m

Loading…
Cancel
Save