[DRE-commits] [diaspora] 205/257: use nginx config and env setup from -common
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Sun Apr 12 14:17:27 UTC 2015
This is an automated email from the git hooks/post-receive script.
praveen pushed a commit to branch master
in repository diaspora.
commit 907f7f81feffcf803d2396e51f88498c6c0c3b10
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Fri Jan 9 00:29:04 2015 +0530
use nginx config and env setup from -common
---
debian/config | 8 ++---
debian/diaspora.docs | 1 -
debian/nginx.conf.example | 80 -----------------------------------------------
3 files changed, 2 insertions(+), 87 deletions(-)
diff --git a/debian/config b/debian/config
index 7ecb633..c7cb48d 100644
--- a/debian/config
+++ b/debian/config
@@ -22,12 +22,8 @@ db_go
# Configure pod address.
db_get diaspora/url
-if ! test -f /etc/diaspora.conf
- then
- echo export SERVERNAME=$RET >> /etc/diaspora.conf
- sed -e "s/SERVERNAME_FIXME/$RET/" -e "s/DIASPORA_SSL_PATH_FIXME/\\/etc\\/diaspora/" -e "s/DIASPORA_ROOT_FIXME/\\/usr\\/share\\/diaspora/" /usr/share/doc/diaspora/nginx.conf.example >/etc/nginx/sites-available/$RET
- ln -fs /etc/nginx/sites-available/$RET /etc/nginx/sites-enabled/
-fi
+
+/usr/lib/diaspora-common/scripts/set-env-nginx.sh $RET
if [ "$RET" = "false" ]; then
db_go
diff --git a/debian/diaspora.docs b/debian/diaspora.docs
deleted file mode 100644
index fee0fb2..0000000
--- a/debian/diaspora.docs
+++ /dev/null
@@ -1 +0,0 @@
-debian/nginx.conf.example
diff --git a/debian/nginx.conf.example b/debian/nginx.conf.example
deleted file mode 100644
index 400fbc9..0000000
--- a/debian/nginx.conf.example
+++ /dev/null
@@ -1,80 +0,0 @@
-upstream domain11 {
- server 127.0.0.1:3000;
-}
-
-server {
- listen 80;
- server_name SERVERNAME_FIXME;
- rewrite ^ https://$server_name$request_uri? permanent;
-}
-
-server {
- listen 443;
- server_name SERVERNAME_FIXME;
-
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-FORWARDED-PROTO https;
-
- ssl on;
- ssl_certificate DIASPORA_SSL_PATH_FIXME/ssl/SERVERNAME_FIXME-bundle.pem;
- ssl_certificate_key DIASPORA_SSL_PATH_FIXME/ssl/SERVERNAME_FIXME.key;
-
- access_log /var/log/diaspora/access.log;
- error_log /var/log/diaspora/error.log;
-
- root DIASPORA_ROOT_FIXME/public/;
- index index2.html;
-
- if ($http_user_agent ~* Googlebot) {
- return 403;
- }
-
- location /uploads/images {
- expires 1d;
- add_header Cache-Control public;
- }
-
- location /assets {
- expires 1d;
- add_header Cache-Control public;
- }
-
- 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_set_header X-Forwarded-Proto https;
- proxy_redirect off;
-
- client_max_body_size 4M;
- client_body_buffer_size 128K;
-
- 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://domain11;
-
- break;
- }
- }
-
- if ($http_user_agent ~ "Python-urllib" ) {
- return 403;
- }
-
- if ($http_user_agent ~ "libwww-perl" ) {
- return 403;
- }
-
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root DIASPORA_ROOT_FIXME;
- }
-}
-
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/diaspora.git
More information about the Pkg-ruby-extras-commits
mailing list