bcremer / shopware-with-nginx

Running shopware using NGINX
http://shopware.com
BSD 2-Clause "Simplified" License
95 stars 46 forks source link

Block direct access to ESDs #8

Closed samuelvogel closed 9 years ago

samuelvogel commented 9 years ago

The PHP setting is the default anyways, so restricting direct access should not be a problem.

bcremer commented 9 years ago

Looks fine to me, will check this later today.

bcremer commented 9 years ago

Thanks @samuelvogel :+1:

bcremer commented 9 years ago

After merging I was thinking about creating a variable for the esd key to get rid of the hardcoded value in global/shopware.con.

# sites-available/example.com.conf
set $shopware_esd_key '552211cce724117c3178e3d22bec532ec';`
# global/shopware.con
location ^~ /files/$shopware_esd_key/ {
    internal;
}

Unfortunately that seems not possible with plain Nginx config.

Edit: Created an issue for that: https://github.com/bcremer/shopware-with-nginx/issues/9