perusio / drupal-with-nginx

Running Drupal using nginx: an idiosyncratically crafted bleeding edge configuration.
854 stars 246 forks source link

What exactely means @drupal as location in drupal.conf #215

Open accuraz opened 9 years ago

accuraz commented 9 years ago

In the file apps/drupal.conf there is a section called Security measures

The location defined for applying theses Security measures is @drupal, see above

location @drupal {
    ## Include the FastCGI config.
    include apps/drupal/fastcgi_drupal.conf;
    fastcgi_pass phpcgi;

    ## FastCGI microcache.
    include apps/drupal/microcache_fcgi.conf;
    ## FCGI microcache for authenticated users also.
    #include apps/drupal/microcache_fcgi_auth.conf;

    ## If proxying to apache comment the two lines above and
    ## uncomment the two lines below.
    #proxy_pass http://phpapache/index.php?q=$uri;
    #proxy_set_header Connection '';

    ## Proxy microcache.
    #include apps/drupal/microcache_proxy.conf;
    ## Proxy microcache for authenticated users also.
    #include apps/drupal/microcache_proxy_auth.conf;

    ## Filefield Upload progress
    ## http://drupal.org/project/filefield_nginx_progress support
    ## through the NginxUploadProgress modules.
    track_uploads uploads 60s;
}

I don't understand what @drupal location is representing into the filesystem. If it's representing drupal's root directory why just not use / instead of @drupal.

Or maybe I'm on a wrong path with my interpretation of @drupal.

Can someone help me out please ?

Thank you per advance.

xlr5 commented 9 years ago

Hi, The “@” prefix defines a named location. Such a location is not used for a regular request processing, but instead used for request redirection. They cannot be nested, and cannot contain nested locations.

http://nginx.org/en/docs/http/ngx_http_core_module.html#location

hth