{"action":"created","issue":{"url":"https://api.github.com/repos/ckan/ckan/issues/3195","repository_url":"https://api.github.com/repos/ckan/ckan","labels_url":"https://api.github.com/repos/ckan/ckan/issues/3195/labels{/name}","comments_url":"https://api.github.com/repos/ckan/ckan/issues/3195/comments","events_url":"https://api.github.com/repos/ckan/ckan/issues/3195/events","html_url":"https://github.com/ckan/ckan/issues/3195","id":169895953,"number":3195,"title":"Fanstatic not honouring root_path","user":{"login":"erlingbo","id":16657,"avatar_url":"https://avatars.githubusercontent.com/u/16657?v=3","gravatar_id":"","url":"https://api.github.com/users/erlingbo","html_url":"https://github.com/erlingbo","followers_url":"https://api.github.com/users/erlingbo/followers","following_url":"https://api.github.com/users/erlingbo/following{/other_user}","gists_url":"https://api.github.com/users/erlingbo/gists{/gist_id}","starred_url":"https://api.github.com/users/erlingbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erlingbo/subscriptions","organizations_url":"https://api.github.com/users/erlingbo/orgs","repos_url":"https://api.github.com/users/erlingbo/repos","events_url":"https://api.github.com/users/erlingbo/events{/privacy}","received_events_url":"https://api.github.com/users/erlingbo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"wardi","id":153258,"avatar_url":"https://avatars.githubusercontent.com/u/153258?v=3","gravatar_id":"","url":"https://api.github.com/users/wardi","html_url":"https://github.com/wardi","followers_url":"https://api.github.com/users/wardi/followers","following_url":"https://api.github.com/users/wardi/following{/other_user}","gists_url":"https://api.github.com/users/wardi/gists{/gist_id}","starred_url":"https://api.github.com/users/wardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wardi/subscriptions","organizations_url":"https://api.github.com/users/wardi/orgs","repos_url":"https://api.github.com/users/wardi/repos","events_url":"https://api.github.com/users/wardi/events{/privacy}","received_events_url":"https://api.github.com/users/wardi/received_events","type":"User","site_admin":false},"assignees":[{"login":"wardi","id":153258,"avatar_url":"https://avatars.githubusercontent.com/u/153258?v=3","gravatar_id":"","url":"https://api.github.com/users/wardi","html_url":"https://github.com/wardi","followers_url":"https://api.github.com/users/wardi/followers","following_url":"https://api.github.com/users/wardi/following{/other_user}","gists_url":"https://api.github.com/users/wardi/gists{/gist_id}","starred_url":"https://api.github.com/users/wardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wardi/subscriptions","organizations_url":"https://api.github.com/users/wardi/orgs","repos_url":"https://api.github.com/users/wardi/repos","events_url":"https://api.github.com/users/wardi/events{/privacy}","received_events_url":"https://api.github.com/users/wardi/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-08-08T10:57:06Z","updated_at":"2016-11-06T12:20:13Z","closed_at":null,"body":"### CKAN Version if known (or site URL)\n\nmaster( 5f4949c924f3a95c59ab4faf0026629804b83f7a )\n### Please describe the expected behaviour\n\nSetting root_path to \"/testing/{{LANG}} should make all links and resources fetched from www.site_url/testing/\n### Please describe the actual behaviour\n\nMost of the stuff is linked to /testing but js, css and the like is fetched from /fanstatic/...\n### What steps can be taken to reproduce the issue?\n\nset `ckan.root_path = /testing/{{LANG}}/`\n\nMight be needed to look at my web setup as well. Using chef to setup apache2 and nginx as reverseproxy\n\n**nginx site:**\n\n```\nproxy_cache_path /tmp/nginx_cache levels=1:2 keys_zone=cache:30m max_size=250m;\nproxy_temp_path /tmp/nginx_proxy 1 2;\n\nserver {\n    client_max_body_size 100M;\n    location /testing/ {\n        proxy_pass http://127.0.0.1:8080/;\n        proxy_set_header X-Forwarded-For $remote_addr;\n        proxy_set_header Host $host;\n        proxy_cache cache;\n        proxy_cache_bypass $cookie_auth_tkt;\n        proxy_no_cache $cookie_auth_tkt;\n        proxy_cache_valid 30m;\n        proxy_cache_key $host$scheme$proxy_host$request_uri;\n        # In emergency comment out line to force caching\n        # proxy_ignore_headers X-Accel-Expires Expires Cache-Control;\n    }\n\n}\n```\n\n**apache2 site:**\n\n```\n<VirtualHost 127.0.0.1:8080>\n    ServerName <%= @server_name %>\n    ServerAlias <%= @server_alias %>\n    WSGIScriptAlias / <%= @config_dir %>/apache.wsgi\n\n    # Pass authorization info on (needed for rest api).\n    WSGIPassAuthorization On\n\n    # Deploy as a daemon (avoids conflicts between CKAN instances).\n    WSGIDaemonProcess ckan_<%= @project_name %> display-name=ckan_<%= @project_name %> processes=2 threads=15\n\n    WSGIProcessGroup ckan_<%= @project_name %>\n\n    ErrorLog /var/log/apache2/ckan_<%= @project_name %>.error.log\n    CustomLog /var/log/apache2/ckan_<%= @project_name %>.custom.log combined\n\n    <IfModule mod_rpaf.c>\n        RPAFenable On\n        RPAFsethostname On\n        RPAFproxy_ips 127.0.0.1\n    </IfModule>\n\n    <Directory />\n        Require all granted\n    </Directory>\n</VirtualHost>\n```\n"},"comment":{"url":"https://api.github.com/repos/ckan/ckan/issues/comments/258677452","html_url":"https://github.com/ckan/ckan/issues/3195#issuecomment-258677452","issue_url":"https://api.github.com/repos/ckan/ckan/issues/3195","id":258677452,"user":{"login":"MrkGrgsn","id":3621881,"avatar_url":"https://avatars.githubusercontent.com/u/3621881?v=3","gravatar_id":"","url":"https://api.github.com/users/MrkGrgsn","html_url":"https://github.com/MrkGrgsn","followers_url":"https://api.github.com/users/MrkGrgsn/followers","following_url":"https://api.github.com/users/MrkGrgsn/following{/other_user}","gists_url":"https://api.github.com/users/MrkGrgsn/gists{/gist_id}","starred_url":"https://api.github.com/users/MrkGrgsn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrkGrgsn/subscriptions","organizations_url":"https://api.github.com/users/MrkGrgsn/orgs","repos_url":"https://api.github.com/users/MrkGrgsn/repos","events_url":"https://api.github.com/users/MrkGrgsn/events{/privacy}","received_events_url":"https://api.github.com/users/MrkGrgsn/received_events","type":"User","site_admin":false},"created_at":"2016-11-06T12:20:12Z","updated_at":"2016-11-06T12:20:12Z","body":"I can reproduce this in master and 2.6.0 using both paster serve and apache 2.4 w/mod_wsgi (without nginx) on Fedora 23 . The other config difference between my apache setup and @erlingbo's is I have `WSGIScriptAlias /data /etck/ckan/default/apache.wsgi`\r\n\r\nThe problem for me is that the RootPathMiddleware has been moved back to the bottom of the WSGI stack in d9f3a5036a99c5e447ad93977e99ba745e2868c3 and it is messing up the environment for the Fanstatic middleware, i.e., Fanstatic is passed an empty `SCRIPT_NAME` and it doesn't know about `ckan.root_path`. Moving the RootPathMiddleware higher up the stack, as in #3090, resolves the issue for me."}}
{"actor":{"display_login":"MrkGrgsn"}}