Skip to content

Instantly share code, notes, and snippets.

@berkes
Forked from michiels/0_site.conf
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save berkes/a6ec56af9a3714453248 to your computer and use it in GitHub Desktop.
Save berkes/a6ec56af9a3714453248 to your computer and use it in GitHub Desktop.
Filenames cannot have /, so `s/;/\//g`
server {
listen 80;
server_name example.com;
root /u/apps/examplecom/current/public;
passenger_enabled on;
passenger_app_env production;
try_files $uri @app;
location @app {
passenger_enabled on;
passenger_app_env production;
include /u/apps/examplecom/shared/nginx/app/*.conf;
}
include /u/apps/examplecom/shared/nginx/main/*.conf;
}
server {
listen 443 default_server ssl;
server_name example.com;
ssl_certificate xxx.crt;
ssl_certificate_key yyy.key;
root /u/apps/intercity_site_production/current/public;
include /u/apps/examplecom/shared/nginx/ssl/*.conf;
}
location ~ ^/(assets)/ {
root /u/apps/intercity_site_production/current/public;
gzip_static on;
expires max;
add_header Cache-Control public;
}
location ^~ /blog {
root /u/apps/intercity_blog;
index index.php;
try_files $uri $uri/ /blog/index.php;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/u/apps/intercity_blog/intercity_blog.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment