Last active
December 11, 2015 16:28
-
-
Save joar/4627472 to your computer and use it in GitHub Desktop.
Host MediaGoblin in a subdirectory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| # [...] | |
| # Your regular MediaGoblin nginx configuration settings | |
| # [...] | |
| # Mounting MediaGoblin via FastCGI. | |
| location /MEDIAGOBLIN_SUBFOLDER/ { | |
| fastcgi_pass 127.0.0.1:26543; # The address of the MediaGoblin FastCGI server | |
| include /etc/nginx/fastcgi_params; | |
| # our understanding and nginx's handling of 'script_name' and | |
| # 'path_info' does not match, so this is where we tell nginx | |
| # how we like it | |
| fastcgi_split_path_info ^((?U)/MEDIAGOBLIN_SUBFOLDER/)(.+)$; | |
| fastcgi_param PATH_INFO /$fastcgi_path_info; | |
| fastcgi_param SCRIPT_NAME "/MEDIAGOBLIN_SUBFOLDER/"; | |
| # Please replace all MEDIAGOBLIN_SUBFOLDER and replace them with the | |
| # subfolder path. | |
| # If your desired path is: "http://localhost/mediagoblin/" then your | |
| # replacement is "mediagoblin" without the quotes. | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment