Skip to content

Instantly share code, notes, and snippets.

@pulpfree
Last active November 16, 2015 19:46
Show Gist options
  • Select an option

  • Save pulpfree/30baaf6e8fa4761c6e24 to your computer and use it in GitHub Desktop.

Select an option

Save pulpfree/30baaf6e8fa4761c6e24 to your computer and use it in GitHub Desktop.
server {
server_name www.theteachableproject.org;
return 301 $scheme://theteachbleproject.org$request_uri;
}
server {
listen 80;
listen 443 ssl;
server_name theteachableproject.org;
ssl_certificate ssl/theteachableproject_org-combined.crt;
ssl_certificate_key ssl/theteachableproject_org.key;
index index.php;
root /var/www/TheTeachable/public;
access_log /var/log/nginx/theteachable_access.log vhosts;
try_files $uri $uri/ /index.php;
# Error Pages
error_page 404 /404.html;
error_page 404 502 503 504 /50x.html;
# PHP-FPM Support
location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_param APPLICATION_ENV production;
fastcgi_param ZF2_PATH vendor/zf2/library;
fastcgi_param PHP_VALUE "session.save_path=/var/www/TheTeachable-stage/data/session \n session.use_only_cookies=true \n session.name=TTSESSID \n session.cookie_domain=.theteachable-stage.pflabs.io";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment