Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

323 lines (250 sloc) 7.525 kb

server { listen 80; server_name www.vegguide.org vegguide.org;

error_log /var/log/nginx/vegguide.org/error.log; access_log /var/log/nginx/vegguide.org/access.log;

add_header P3P “policyref="http://www.vegguide.org/w3c/p3p.xml", CP="ALL DSP COR CURa ADMa \DEVa TAIa PSAa PSDa OUR IND PHY ONL COM NAV DEM STA"”;

location ^~ /mailman { rewrite ^(.*) https://lists.vegguide.org$1 permanent; }

location ^~ /pipermail { rewrite ^(.*) https://lists.vegguide.org$1 permanent; }

#rewrite !^/down.html$ /down.html redirect; location = /down.html { rewrite ^ /; }

set $var_dir /var/lib/vegguide; set $cache_dir /var/cache/vegguide; set $share_dir /usr/local/share/vegguide;

error_page 503 $share_dir/static/503.html;

location ~ .*favicon.gif$ { rewrite ^ /favicon.ico permanent; }

location = /favicon.ico { root $share_dir/images; }

location ~ ^/\w+/(css/vegguide-combined.css) { expires max; alias $var_dir/$1; }

location ~ ^(?:/\w+)?/(css|images)(.+) { expires max; alias $share_dir/$1$2; }

location ~ ^(?:/\w+)?/(js/.+) { expires max; alias $var_dir/$1; }

location ^~ static/rss { alias $cache_dir/rss; }

location = /site.rss { root $cache_dir/rss; }

location ^~ /static { alias $share_dir/static; }

location ^~ /w3c { alias $share_dir/w3c; }

location = /robots.txt { root $share_dir/static; }

location ^~ /entry-images { root $var_dir; }

location ^~ /user-images { root $var_dir; }

location ~ (.*/)?([^/]+).mhtml$ { set $path $1$2; rewrite ^ $path.html permanent; }

location ~ ^.+.rss%3[Ff] { rewrite ^ / permanent; }

location ^~ /location { if ( $arg_location_id ~ (\d+) ) { set $region_id $1; rewrite ^/location/view.html /region/$region_id? permanent; rewrite ^/location/data.rss /region/$region_id.rss? permanent; rewrite ^/location/most_recent.rss /region/$region_id/recent.rss? permanent; rewrite ^/location/most_recent_vendors.rss /region/$region_id/recent.rss?entries_only=1 permanent; rewrite ^/location/most_recent_reviews.rss /region/$region_id/recent.rss?reviews_only=1 permanent; } rewrite ^ / break; }

location ^~ /vendor { if ( $arg_vendor_id ~ (\d+) ) { set $vendor_id $1; rewrite ^/vendor/view.html /entry/$vendor_id? permanent; rewrite ^/vendor/reviews.html /entry/$vendor_id/reviews? permanent; } rewrite ^ / break; }

location ^~ /user { if ( $arg_user_id ~ (\d+) ) { set $user_id $1; rewrite ^/user/view.html /user/$user_id? permanent; } try_files $uri @backend; }

location = /index.html { rewrite ^ / permanent; }

location = /faq.html { rewrite ^ /site/help permanent; }

location = /rss/data_feed.html { rewrite ^ /site/data_feed permanent; }

location ^~ /rss { rewrite ^ /site/feeds permanent; }

location ^~ /news { rewrite ^ /site/news permanent; }

location ~ ^/rss/static/all\w+.rss { rewrite ^ /site.rss permanent; }

location ^~ /noauth { rewrite ^ / redirect; }

location ^~ /submit/search { rewrite ^ /site/search?search_text=$arg_search permanent; }

location ^~ /plain { return 410; }

location ~ ^/(?:events?|location|logged-in||news|noauth|vendor)/.*.html { return 410; }

location ~ ^/(?:source|privacy|about|contact|info_key|contest|todo).html { return 410; }

location ~ ^/(?:search|printable|location_suggestion|promo_cards|vegsiteinabox).html { return 410; }

location ~ ^/by_(?:name|geocode|zipcode).html { return 410; }

location ^~ /submit { return 410; }

location ^~ /maps/c/ui/HovercardLauncher/dommanifest.js { return 404; }

location ^~ /.api/main.js { return 404; }

location ^~ /ge/v/1/4/loader.js { return 404; }

location ^~ /__utm.gif { return 404; }

location ~ ^\/apple-touch-icon-\d+x\d+(?:-precomposed)?.png { return 404; }

location ^~ /sitemap.xml { return 404; }

location ^~ /signup { return 404; }

location ^~ /labels.rdf { return 404; }

location ^~ /sugest.css { return 404; }

location ^~ /https://www.paypal.com/cgi-bin/webscr { return 404; }

location ~ .(?:asp|cfn|php|dll)$ { return 404; }

location ~ (?:ikonboard.cgi|YaBB.pl)$ { return 404; }

location ^~ /add.php3 { return 404; }

location ^~ /uds { return 404; }

location ^~ /img { return 404; }

location ^~ /… { return 404; }

location / { try_files $uri @backend; }

location @backend { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffers 32 4k;

proxy_pass http://localhost:8088; } }

server { listen 80; server_name uchicago.vegguide.org athens.vegguide.org;

error_log /var/log/nginx/error.log; access_log /var/log/nginx/access.log;

rewrite ^ http://www.vegguide.org$request_uri permanent; }

server { listen 443; server_name lists.vegguide.org;

error_log /var/log/nginx/error.log; access_log /var/log/nginx/access.log;

ssl on; ssl_certificate /etc/ssl/certs/www.vegguide.org.crt; ssl_certificate_key /etc/ssl/private/www.vegguide.org.key;

root /usr/lib;

location = / { rewrite ^ /mailman/listinfo permanent; }

location / { rewrite ^ /mailman$uri?$args; }

location = mailman { rewrite ^ /mailman/listinfo permanent; }

location mailman { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffers 32 4k;

proxy_pass http://127.0.0.1:7777/; }

location /cgi-bin { rewrite ^/cgi-bin(.*)$ $1 permanent; }

location /images/mailman { alias /var/lib/mailman/icons; }

location /pipermail { alias /var/lib/mailman/archives/public; autoindex on; } }

Jump to Line
Something went wrong with that request. Please try again.