{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/4176","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/4176/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/4176/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/4176/events","html_url":"https://github.com/magento/magento2/issues/4176","id":148729448,"number":4176,"title":"Nginx config pub location","user":{"login":"jackiellowery","id":2509131,"avatar_url":"https://avatars.githubusercontent.com/u/2509131?v=3","gravatar_id":"","url":"https://api.github.com/users/jackiellowery","html_url":"https://github.com/jackiellowery","followers_url":"https://api.github.com/users/jackiellowery/followers","following_url":"https://api.github.com/users/jackiellowery/following{/other_user}","gists_url":"https://api.github.com/users/jackiellowery/gists{/gist_id}","starred_url":"https://api.github.com/users/jackiellowery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackiellowery/subscriptions","organizations_url":"https://api.github.com/users/jackiellowery/orgs","repos_url":"https://api.github.com/users/jackiellowery/repos","events_url":"https://api.github.com/users/jackiellowery/events{/privacy}","received_events_url":"https://api.github.com/users/jackiellowery/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/magento/magento2/labels/forum","name":"forum","color":"5319e7"},{"url":"https://api.github.com/repos/magento/magento2/labels/needs%20update","name":"needs update","color":"eb6420"},{"url":"https://api.github.com/repos/magento/magento2/labels/question","name":"question","color":"207de5"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-15T18:14:26Z","updated_at":"2016-05-10T01:25:46Z","closed_at":"2016-05-09T21:17:47Z","body":"This is more of a question than an issue?  In this part of nginx.conf:\r\n\r\n`location /pub {\r\n    location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*\\.xml) {\r\n        deny all;\r\n    }\r\n    alias $MAGE_ROOT/pub;\r\n    add_header X-Frame-Options \"SAMEORIGIN\";\r\n}`\r\n\r\nShouldn't root be used instead of alias, per the official docs, since the location matches the last part of the directives value.  See here: [nginx alias](http://nginx.org/en/docs/http/ngx_http_core_module.html#alias)\r\n\r\nLike this: \r\n\r\n`location /pub {\r\n    location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*\\.xml) {\r\n        deny all;\r\n    }\r\n    root $MAGE_ROOT;\r\n    add_header X-Frame-Options \"SAMEORIGIN\";\r\n}`\r\n"},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/218035805","html_url":"https://github.com/magento/magento2/issues/4176#issuecomment-218035805","issue_url":"https://api.github.com/repos/magento/magento2/issues/4176","id":218035805,"user":{"login":"devdesco-ceo","id":8983883,"avatar_url":"https://avatars.githubusercontent.com/u/8983883?v=3","gravatar_id":"","url":"https://api.github.com/users/devdesco-ceo","html_url":"https://github.com/devdesco-ceo","followers_url":"https://api.github.com/users/devdesco-ceo/followers","following_url":"https://api.github.com/users/devdesco-ceo/following{/other_user}","gists_url":"https://api.github.com/users/devdesco-ceo/gists{/gist_id}","starred_url":"https://api.github.com/users/devdesco-ceo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devdesco-ceo/subscriptions","organizations_url":"https://api.github.com/users/devdesco-ceo/orgs","repos_url":"https://api.github.com/users/devdesco-ceo/repos","events_url":"https://api.github.com/users/devdesco-ceo/events{/privacy}","received_events_url":"https://api.github.com/users/devdesco-ceo/received_events","type":"User","site_admin":false},"created_at":"2016-05-10T01:25:46Z","updated_at":"2016-05-10T01:25:46Z","body":"Nginx default config file is broken.\r\nI have made my own Nginx configuration for three servers tier and implemented all of the latest and the bestest practices for secure and fast web. Check me out at https://endohaus.com"}}