diff options
-rw-r--r-- | tools/conf/etc/nginx/conf.d/10-default.conf | 8 | ||||
-rw-r--r-- | tools/conf/etc/nginx/nginx.conf | 9 | ||||
-rw-r--r-- | tools/conf/etc/nginx/sites-enabled/mantisbt.conf | 23 |
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; + } +} |