Commit 6d942036 authored by jz143's avatar jz143

new nginx config

parent d359739a
......@@ -30,6 +30,45 @@ scp config/database.yml config/secrets.yml config/settings.local.yml appstore@ap
VERBOSE=1 QUEUE=mac_online rake environment resque:work
```
### Configure Nginx
```
# /etc/nginx/sites-enabled/appstore.conf
upstream puma {
server unix:///home/appstore/appstore/shared/tmp/sockets/puma.sock;
}
server {
listen 80;
listen 443 default ssl;
server_name appstore.colab.duke.edu;
ssl_certificate /home/appstore/appstore.colab.duke.edu.crt;
ssl_certificate_key /home/appstore/appstore.colab.duke.edu.key;
client_max_body_size 500m;
root /home/appstore/appstore/current/public;
try_files $uri/index.html $uri @app;
if ($ssl_protocol = "") {
rewrite ^ https://$server_name$request_uri? redirect;
}
location /system/app_files/archives {
internal;
}
location @app {
proxy_pass http://puma;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Sendfile-Type X-Accel-Redirect;
}
}
```
### Auto-start Rails app on app server
#### Rails server
```
......@@ -85,3 +124,4 @@ unix:///home/appstore/appstore/shared/tmp/sockets/puma.sock
* Sidebar on app download page to showcase related apps, as well as more info about us
* Slack integration
* Support for Android apps
* External app store support
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment