about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSilvino Silva <silvino@bk.ru>2016-09-28 01:46:45 +0100
committerSilvino Silva <silvino@bk.ru>2016-09-28 01:46:45 +0100
commit70951b1c23510043c6f321281ff3b80096fc4502 (patch)
tree0b6da3ea9cdfad875ff7cf34a811bf87fa8a2d0b
parente21d5e3ff4e7fea8755bbfa376e8cddf2bacab5a (diff)
downloaddoc-70951b1c23510043c6f321281ff3b80096fc4502.tar.gz
nginx revision with mantisbt
-rw-r--r--tools/conf/etc/nginx/conf.d/10-default.conf8
-rw-r--r--tools/conf/etc/nginx/nginx.conf9
-rw-r--r--tools/conf/etc/nginx/sites-enabled/mantisbt.conf23
3 files changed, 31 insertions, 9 deletions
diff --git a/tools/conf/etc/nginx/conf.d/10-default.conf b/tools/conf/etc/nginx/conf.d/10-default.conf
new file mode 100644
index 0000000..97ee31b
--- /dev/null
+++ b/tools/conf/etc/nginx/conf.d/10-default.conf
@@ -0,0 +1,8 @@
+##
+# Virtual Host Redirection 80 to 443
+##
+server {
+    listen         80 default_server;
+    server_name _;
+    return         301 https://$host$request_uri;
+}
diff --git a/tools/conf/etc/nginx/nginx.conf b/tools/conf/etc/nginx/nginx.conf
index 20f53e0..ddbdee6 100644
--- a/tools/conf/etc/nginx/nginx.conf
+++ b/tools/conf/etc/nginx/nginx.conf
@@ -55,15 +55,6 @@ http {
     gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
 
 
-    ##
-    # Virtual Host Configs
-    ##
-    server {
-        listen         80 default_server;
-	server_name _;
-        return         301 https://$host$request_uri;
-    }
-
     include /etc/nginx/conf.d/*.conf;
     include /etc/nginx/sites-enabled/*.conf;
 
diff --git a/tools/conf/etc/nginx/sites-enabled/mantisbt.conf b/tools/conf/etc/nginx/sites-enabled/mantisbt.conf
new file mode 100644
index 0000000..597983f
--- /dev/null
+++ b/tools/conf/etc/nginx/sites-enabled/mantisbt.conf
@@ -0,0 +1,23 @@
+server {
+    listen 443 ssl;
+    # listen [::]:443 ssl;
+
+    root /srv/www/mantisbt;
+    server_name core.privat-network.net;
+
+    index index.php;
+
+    location / {
+        try_files $uri $uri/ /index.php$is_args$args;
+    }
+
+    location ~ \.php$ {
+        fastcgi_split_path_info ^(.+\.php)(/.+)$;
+        fastcgi_index index.php;
+        # try_files $uri /index.php =404;
+        include /etc/nginx/fastcgi_params;
+        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+        # fastcgi_pass unix:/var/run/php5-fpm.sock;
+        fastcgi_pass 127.0.0.1:9000;
+    }
+}