Skip to content

Commit

Permalink
new nginx templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Okeanij committed May 22, 2020
1 parent 60095bc commit 4e36871
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 58 deletions.
2 changes: 1 addition & 1 deletion Client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sunengine-client",
"version": "2.10.14",
"version": "2.11.2",
"description": "SunEngine - web engine with support of blog, forum and articles functionality",
"productName": "SunEngine",
"author": "Dmitrij Polianin",
Expand Down
2 changes: 1 addition & 1 deletion README.RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# SunEngine

<a href="#"><img src="https://img.shields.io/static/v1?label=%D0%92%D0%B5%D1%80%D1%81%D0%B8%D1%8F&message=v2.10.14&color=green"></a>
<a href="#"><img src="https://img.shields.io/static/v1?label=%D0%92%D0%B5%D1%80%D1%81%D0%B8%D1%8F&message=v2.11.2&color=green"></a>
<a href="#"><img src="https://github.com/sunengine/SunEngine/workflows/.NET%20Core/badge.svg" ></a>
<a href="#"><img src="https://github.com/sunengine/SunEngine/workflows/Quasar/badge.svg" ></a>
<br/>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Build on: AspNet Core, VueJS, Quasar.</h3>

# SunEngine

<a href="#"><img src="https://img.shields.io/static/v1?label=Version&message=v2.10.14&color=green"></a>
<a href="#"><img src="https://img.shields.io/static/v1?label=Version&message=v2.11.2&color=green"></a>
<a href="#"><img src="https://github.com/sunengine/SunEngine/workflows/.NET%20Core/badge.svg" ></a>
<a href="#"><img src="https://github.com/sunengine/SunEngine/workflows/Quasar/badge.svg" ></a>
<br/>
Expand Down
56 changes: 4 additions & 52 deletions Resources/nginx.template
Original file line number Diff line number Diff line change
@@ -1,58 +1,10 @@
server {
listen 443 http2;
listen [::]:443 http2;

#ssl on;
#ssl_certificate /etc/letsencrypt/live/demo.sunengine.site/fullchain.pem;
#ssl_certificate_key /etc/letsencrypt/live/demo.sunengine.site/privkey.pem;
#ssl_session_cache shared:SSL:11m;
#ssl_protocols TLSv1.2 TLSv1.3;
#ssl_ciphers 'TLS-CHACHA20-POLY1305-SHA256:TLS-AES-256-GCM-SHA384:TLS-AES-128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256';
#ssl_prefer_server_ciphers on;

gzip on;
gzip_buffers 16 8k;
gzip_comp_level 6;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;
gzip_types text/xml application/atom+xml application/rss+xml application/xhtml+xml text/javascript application/javascript application/x-javascript text/x-json application/json application/x-web-app-manifest+json text/css text/plain text/html font/opentype application/x-font-ttf image/x-icon image/svg+xml;
gzip_disable "msie6";

add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
add_header Content-Security-Policy "default-src 'self' 'unsafe-inline'; font-src 'self' https://fonts.gstatic.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; frame-src 'self' https://www.youtube.com; script-src 'self' 'unsafe-inline'";
listen 80;
listen [::]:80;

server_name <host>;

charset utf-8;

location / {
root <wwwroot>;
try_files $uri $uri/ /index.html;

open_file_cache max=1000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;

location ~ \.(js|json|css|svg|svgz|eot|otf|woff|woff2|ttf|rss|atom|ico|jpg|jpeg|gif|png)$ {
expires 14d;
}
}

location /api/ {
proxy_pass http://localhost:<port>/;
client_max_body_size 11M;
}
}

server {
listen 80;
listen [::]:80;
server_name <host>;
return 301 https://$host$request_uri;
}

root <wwwroot>;
}
53 changes: 53 additions & 0 deletions Resources/nginxssl.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
server {
listen 443 ssl;

ssl_certificate /etc/letsencrypt/live/<host>/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/<host>/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

gzip on;
gzip_buffers 16 8k;
gzip_comp_level 6;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;
gzip_types text/xml application/atom+xml application/rss+xml application/xhtml+xml text/javascript application/javascript application/x-javascript text/x-json application/json application/x-web-app-manifest+json text/css text/plain font/opentype application/x-font-ttf image/x-icon image/svg+xml;
gzip_disable "msie6";

add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
add_header Content-Security-Policy "default-src 'self' 'unsafe-inline'; font-src 'self' https://fonts.gstatic.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; frame-src 'self' https://www.youtube.com; script-src 'self' 'unsafe-inline'";

server_name <host>;

charset utf-8;

location / {
root <wwwroot>;
try_files $uri $uri/ /index.html;

open_file_cache max=1000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;

location ~ \.(js|json|css|svg|svgz|eot|otf|woff|woff2|ttf|rss|atom|ico|jpg|jpeg|gif|png)$ {
expires 14d;
}
}

location /api/ {
proxy_pass http://localhost:<port>/;
client_max_body_size 11M;
}
}

server {
listen 80;
listen [::]:80;
server_name <host>;
return 301 https://$host$request_uri;
}
2 changes: 1 addition & 1 deletion Server/SunEngine.Cli/SunEngine.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
<Version>2.10.14</Version>
<Version>2.11.2</Version>
<Title>SunEngine</Title>
<Authors>Dmitrij Polianin</Authors>
<Description>Site engine with blog, forum and articles functionalities on Asp.Net Core and Vue.Js.</Description>
Expand Down
2 changes: 1 addition & 1 deletion Server/SunEngine.Core/SunEngine.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>2.10.14</Version>
<Version>2.11.2</Version>
<LangVersion>default</LangVersion>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion SunEngine.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SunEngine
**Version 2.10.14**
**Version 2.11.2**
***************************************************************
Do not delete this file! This file need to detect project root.
***************************************************************
Expand Down

0 comments on commit 4e36871

Please sign in to comment.