Conflicts: app/models/user.rb config/deploy.rb spec/factories.rb spec/models/request_spec.rb spec/spec_helper.rb
85 lines
2.2 KiB
Nginx Configuration File
85 lines
2.2 KiB
Nginx Configuration File
# Copyright 2010 Diaspora Inc.
|
|
#
|
|
# This file is part of Diaspora.
|
|
#
|
|
# Diaspora is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# Diaspora is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with Diaspora. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
|
|
|
|
|
|
worker_processes 1;
|
|
pid /tmp/pids/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 8192;
|
|
}
|
|
|
|
http {
|
|
|
|
include mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
log_format main '$remote_addr - $remote_user [$time_local] '
|
|
'"$request" $status $body_bytes_sent "$http_referer" '
|
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
|
|
sendfile on;
|
|
|
|
keepalive_timeout 65;
|
|
|
|
gzip on;
|
|
gzip_http_version 1.0;
|
|
gzip_comp_level 2;
|
|
gzip_proxied any;
|
|
gzip_buffers 16 8k;
|
|
#gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
|
# gzip_disable "MSIE [1-6]\.(?!.*SV1)";
|
|
upstream thin_cluster {
|
|
server unix:/tmp/thin.0.sock;
|
|
}
|
|
|
|
server {
|
|
|
|
listen 80;
|
|
server_name pivots.joindiaspora.com www.pivots.joindiaspora.com;
|
|
root /usr/local/app/diaspora/current;
|
|
|
|
location / {
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header Host $http_host;
|
|
proxy_redirect off;
|
|
proxy_buffering off;
|
|
|
|
if (-f $request_filename/index.html) {
|
|
rewrite (.*) $1/index.html break;
|
|
}
|
|
if (-f $request_filename.html) {
|
|
rewrite (.*) $1.html break;
|
|
}
|
|
if (!-f $request_filename) {
|
|
proxy_pass http://thin_cluster;
|
|
break;
|
|
}
|
|
}
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root html;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|