diff options
Diffstat (limited to 'roles/mediagoblin/templates')
-rw-r--r-- | roles/mediagoblin/templates/etc_nginx_sites-available_mediagoblin.j2 | 24 | ||||
-rw-r--r-- | roles/mediagoblin/templates/paste_local.ini.j2 | 8 |
2 files changed, 20 insertions, 12 deletions
diff --git a/roles/mediagoblin/templates/etc_nginx_sites-available_mediagoblin.j2 b/roles/mediagoblin/templates/etc_nginx_sites-available_mediagoblin.j2 index 817f02c..8705d0f 100644 --- a/roles/mediagoblin/templates/etc_nginx_sites-available_mediagoblin.j2 +++ b/roles/mediagoblin/templates/etc_nginx_sites-available_mediagoblin.j2 @@ -37,14 +37,22 @@ server { alias /srv/mediagoblin.example.org/mediagoblin/user_dev/plugin_static/; } - # Mounting MediaGoblin itself via FastCGI. +# # Mounting MediaGoblin itself via FastCGI. +# location / { +# fastcgi_pass 127.0.0.1:26543; +# include /etc/nginx/fastcgi_params; +# +# # our understanding vs nginx's handling of script_name vs +# # path_info don't match :) +# fastcgi_param PATH_INFO $fastcgi_script_name; +# fastcgi_param SCRIPT_NAME ""; +# } + + # Until FastCGI works, just do a proxy pass location / { - fastcgi_pass 127.0.0.1:26543; - include /etc/nginx/fastcgi_params; - - # our understanding vs nginx's handling of script_name vs - # path_info don't match :) - fastcgi_param PATH_INFO $fastcgi_script_name; - fastcgi_param SCRIPT_NAME ""; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_pass http://127.0.0.1:26543; } } diff --git a/roles/mediagoblin/templates/paste_local.ini.j2 b/roles/mediagoblin/templates/paste_local.ini.j2 index fef637e..815140f 100644 --- a/roles/mediagoblin/templates/paste_local.ini.j2 +++ b/roles/mediagoblin/templates/paste_local.ini.j2 @@ -53,7 +53,7 @@ debug = false [server:main] use = egg:waitress#main host = 127.0.0.1 -port = 6543 +port = 26543 # # Gunicorn settings. See http://docs.gunicorn.org/en/19.0/settings.html # # for more information about configuring Gunicorn # proc_name = gmg @@ -66,16 +66,16 @@ port = 6543 # If you are configuring the paste config manually, you can remove # these. -# Use this if you want to run on port 6543 and have MediaGoblin be +# Use this if you want to run on port 26543 and have MediaGoblin be # viewable externally [server:broadcast] use = egg:waitress#main host = 0.0.0.0 -port = 6543 +port = 26543 # Use this if you want to connect via fastcgi [server:fcgi] -use = egg:flup#fcgi_fork +use = egg:flup6#fcgi_fork host = %(fcgi_host)s port = %(fcgi_port)s |