Skip to content

Commit 1761245

Browse files
Merge branch 'development' into BLAZ-982992-fileupload-methods-new
2 parents acfd291 + ec7c7dc commit 1761245

33 files changed

+5669
-2822
lines changed

blazor-toc.html

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,17 @@
170170
<li><a href="/blazor/smart-ai-solutions/ai-samples/treegrid/adaptive-structuring">Adaptive Structuring</a></li>
171171
</ul>
172172
</li>
173+
<li> Rich Text Editor
174+
<ul>
175+
<li><a href="/blazor/smart-ai-solutions/ai-samples/rich-text-editor/writting-assistance">Writting Assistance</a></li>
176+
</ul>
177+
</li>
178+
<li> Kanban
179+
<ul>
180+
<li><a href="/blazor/smart-ai-solutions/ai-samples/kanban/smart-task-suggestion">Smart Task Suggestion</a></li>
181+
<li><a href="/blazor/smart-ai-solutions/ai-samples/kanban/sentiment-analysis">Sentiment Analysis</a></li>
182+
</ul>
183+
</li>
173184
</ul>
174185
</li>
175186
<li>Installation<ul>
@@ -375,6 +386,9 @@
375386
<li>
376387
<a href="/blazor/common/deployment/deployment-azure">Deploy a Blazor Web App to Azure App Service</a>
377388
</li>
389+
<li>
390+
<a href="/blazor/common/deployment/deployment-linux-nginx">Deploy a Blazor Web App to Linux with NGINX</a>
391+
</li>
378392
</ul>
379393
</li>
380394
<li>
@@ -3133,7 +3147,8 @@
31333147
<li> <a href="/blazor/gantt-chart/excel-export">Excel Export</a></li>
31343148
<li> <a href="/blazor/gantt-chart/pdf-export">PDF Export</a>
31353149
<ul>
3136-
<li> <a href="/blazor/gantt-chart/template-pdf-export">PDF Exporting with Templates</a> </li>
3150+
<li> <a href="/blazor/gantt-chart/header-and-footer">Header and Footer</a> </li>
3151+
<li> <a href="/blazor/gantt-chart/customize-pdf-export">Customize PDF Export</a> </li>
31373152
</ul>
31383153
</li>
31393154
<li> <a href="/blazor/gantt-chart/timezone">Timezone</a></li>
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
layout: post
3+
title: Deploy a Blazor Web App to Linux with NGINX | Syncfusion
4+
description: Learn here all about deploying the Blazor Web App with Syncfusion Blazor Components to Linux server using NGINX.
5+
platform: Blazor
6+
component: Common
7+
documentation: ug
8+
---
9+
10+
# Deploy Blazor Web App to Linux with NGINX
11+
12+
This section provides information about deploying a Blazor Web applications with the Syncfusion Blazor components to Linux server using NGINX as a reverse proxy.
13+
14+
Refer to [Host ASP.NET Core on Linux with NGINX](https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-9.0&tabs=linux-ubuntu) topic for more information.
15+
16+
## Prerequisites
17+
18+
* Linux Server – Ubuntu 20.04, Red Hat Enterprise (RHEL) 8.0 and SUSE Linux Enterprise Server 12.
19+
* [.NET runtime](https://blazor.syncfusion.com/documentation/system-requirements#net-sdk) installed on the server.
20+
* An existing Blazor Web App with Syncfusion components or create a new one.
21+
22+
## Install and Start NGINX
23+
24+
Install NGINX on your Linux system and enable it to start automatically:
25+
26+
```bash
27+
sudo dnf install nginx
28+
sudo systemctl start nginx
29+
sudo systemctl enable nginx
30+
sudo systemctl status nginx
31+
```
32+
33+
**Verification**: Open `http://your-server-ip` in a browser — you should see the NGINX welcome page.
34+
35+
## Create and publish Your Blazor Web App with Syncfusion Components
36+
37+
* You can create a Blazor Web App using the .NET CLI commands with Syncfusion components by referring [here](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app?tabcontent=.net-cli).
38+
39+
* Publish your Blazor Web application in Release configuration using the following command and run it:
40+
41+
```bash
42+
dotnet publish -c Release -o publish
43+
cd publish
44+
dotnet SfBlazorApp.dll --urls "http://0.0.0.0:5000"
45+
```
46+
47+
![Publish Blazor Web App](../images/publish-blazor-app.png)
48+
49+
## Configure NGINX to Proxy Requests
50+
51+
Create a new NGINX configuration file for your Blazor application:
52+
53+
```bash
54+
sudo nano /etc/nginx/conf.d/blazorapp.conf
55+
```
56+
57+
Add the following configuration to enable NGINX to act as a reverse proxy:
58+
59+
```nginx
60+
server {
61+
listen 80;
62+
server_name _;
63+
location / {
64+
proxy_pass http://localhost:5000;
65+
proxy_http_version 1.1;
66+
proxy_set_header Host $host;
67+
proxy_set_header X-Real-IP $remote_addr;
68+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
69+
proxy_set_header X-Forwarded-Proto $scheme;
70+
proxy_set_header Upgrade $http_upgrade;
71+
proxy_set_header Connection "upgrade";
72+
}
73+
}
74+
```
75+
76+
Save and exit the file (Ctrl+O, Enter, then Ctrl+X).
77+
78+
## Validate and Restart NGINX
79+
80+
Test the NGINX configuration and restart the service:
81+
82+
```bash
83+
sudo nginx -t
84+
sudo systemctl restart nginx
85+
```
86+
87+
## Configure SELinux (For Red Hat-based Systems)
88+
89+
On Red Hat-based systems, SELinux may block NGINX from accessing your Blazor app. Allow NGINX to connect to network services:
90+
91+
```bash
92+
sudo setsebool -P httpd_can_network_connect 1
93+
```
94+
95+
## Access the Application
96+
97+
From your Windows machine or any other device, open a browser and navigate to:
98+
99+
```
100+
http://<your-vm-ip>/
101+
```
102+
103+
You should now see your Blazor Web app running successfully with Syncfusion components!
104+
105+
![Output-Linux](../images/output-linux.png)
106+
107+
## See also
108+
109+
* [Host ASP.NET Core on Linux with NGINX](https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-9.0)
110+
* [Configure NGINX for ASP.NET Core](https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-9.0#configure-nginx)
59.7 KB
Loading
76 KB
Loading

0 commit comments

Comments
 (0)