Implemented adding nginx conf file
parent
665357421a
commit
1d173f2467
@ -1,33 +1,74 @@
|
||||
@inherits NginxBase
|
||||
@page "/nginx"
|
||||
|
||||
<FilesWithEditor CFile="ConfigFile" Filters="Filters" Files="ConfigFiles" FilterFolder="FilterFolder"
|
||||
SelectedFile="SelectedFile" SelectedFileChanged="SelectedFileChanged"
|
||||
TestConfiguration="TestConfiguration" TestResult="TestResult"
|
||||
DeleteFileModal="DeleteFile" DeleteResult="DeleteResult"
|
||||
AddFileModal="ShowAddFileModal" AddResult="AddFileResult">
|
||||
AddFileModal="ShowAddFileModal">
|
||||
</FilesWithEditor>
|
||||
<Modal @ref="AddFileModal">
|
||||
<ModalBackdrop />
|
||||
<ModalContent IsForm="true" IsCentered="true">
|
||||
<ModalContent Class="neomorph">
|
||||
<ModalHeader>
|
||||
<ModalTitle>Add new file form</ModalTitle>
|
||||
<CloseButton Clicked="e => CloseModal(AddFileModal)"/>
|
||||
<ModalTitle Class="has-text-centered">Add a new configuration for a service</ModalTitle>
|
||||
</ModalHeader>
|
||||
<ModalBody>
|
||||
<Blazorise.Bulma.Fields>
|
||||
<Blazorise.Bulma.Field>
|
||||
<Blazorise.Bulma.FieldLabel>File name</Blazorise.Bulma.FieldLabel>
|
||||
<Blazorise.Bulma.FieldBody @bind-FileName="NewFileForm.Name"></Blazorise.Bulma.FieldBody>
|
||||
<Blazorise.Bulma.FieldHelp>Service name which is going to be behing di config file</Blazorise.Bulma.FieldHelp>
|
||||
</Blazorise.Bulma.Field>
|
||||
</Blazorise.Bulma.Fields>
|
||||
<div class="field">
|
||||
<label class="label">Template</label>
|
||||
<div class="control has-icons-left">
|
||||
<div class="select is-small is-rounded neoSelect fullwidth">
|
||||
<select class="fullwidth" @bind="NewFileForm.SelectedTemplate">
|
||||
<option value="0">No template</option>
|
||||
@foreach (var template in NewFileForm.Templates)
|
||||
{
|
||||
<option value="@template.Name">@($"{template.Name.First().ToString().ToUpper()}{template.Name.Substring(1)}")</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<span class="icon is-small is-left has-text-dark">
|
||||
<i class="mdi mdi-puzzle-outline"></i>
|
||||
</span>
|
||||
</div>
|
||||
<p class="help">Any template to quick setup the configuration</p>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label">Configuration file name</label>
|
||||
<div class="control has-icons-left has-icons-right">
|
||||
<input class="input is-rounded is-small neoInput" type="text" @bind="NewFileForm.Name" placeholder="Name" />
|
||||
<span class="icon is-small is-left has-text-dark">
|
||||
<i class="mdi mdi-file-code-outline"></i>
|
||||
</span>
|
||||
</div>
|
||||
<p class="help">Name it the same as the service which is going to run behind</p>
|
||||
</div>
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Blazorise.Bulma.Button Color="Color.Secondary" Clicked="e => CloseModal(AddFileModal)">Close</Blazorise.Bulma.Button>
|
||||
<Blazorise.Bulma.Button Color="Color.Primary" Clicked="AddFileAsync">Add</Blazorise.Bulma.Button>
|
||||
<div class="level fullwidth">
|
||||
<div class="level-left">
|
||||
<div class="level-item">
|
||||
<Blazorise.Bulma.Button Clicked="e => CloseModal(AddFileModal)"
|
||||
Class="is-rounded neoBtnSmall is-small has-text-dark">
|
||||
<span class="icon is-small">
|
||||
<i class="mdi mdi-close"></i>
|
||||
</span>
|
||||
<span>Close</span>
|
||||
</Blazorise.Bulma.Button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="level-right">
|
||||
<div class="level-item">
|
||||
<Blazorise.Bulma.Button Color="Color.Primary" Clicked="AddFileAsync"
|
||||
Class="is-rounded neoBtnSmall is-small has-text-dark" Type="ButtonType.Submit">
|
||||
<span class="icon is-small has-text-success">
|
||||
<i class="mdi mdi-plus"></i>
|
||||
</span>
|
||||
<span>Add</span>
|
||||
</Blazorise.Bulma.Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ModalFooter>
|
||||
</ModalContent>
|
||||
</Modal>
|
||||
<GeneralNotificationModal ModalReference="GeneralNotificationModal"
|
||||
NotificationSettings="GeneralNotificationSettings"></GeneralNotificationModal>
|
||||
@*<GeneralNotificationModal ModalReference="GeneralNotificationModal" NotificationSettings="GeneralNotificationSettings"></GeneralNotificationModal>*@
|
||||
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,39 @@
|
||||
Proxy
|
||||
|
||||
server {
|
||||
server_name <domain name>;
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
server_name <domain name>;
|
||||
listen 443 ssl http2;
|
||||
#listen [::]:443 ssl http2;
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
add_header X-Robots-Tag "none";
|
||||
add_header X-Download-Options "noopen";
|
||||
add_header X-Permitted-Cross-Domain-Policies "none";
|
||||
add_header X-XSS-Protection "1;mode=block";
|
||||
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains";
|
||||
add_header Referrer-Policy "no-referrer";
|
||||
client_max_body_size 1G;
|
||||
|
||||
location / {
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass_request_headers on;
|
||||
proxy_set_header Connection "keep-alive";
|
||||
proxy_store off;
|
||||
proxy_pass http://localhost:<service port>;
|
||||
gzip on;
|
||||
gzip_proxied any;
|
||||
gzip_types *;
|
||||
}
|
||||
|
||||
#ssl_certificate /etc/letsencrypt/live/<domain name>/fullchain.pem;
|
||||
#ssl_certificate_key /etc/letsencrypt/live/<domain name>/privkey.pem;
|
||||
}
|
Loading…
Reference in New Issue