Blog:薛惟仁筆記本
29177|[Python] 爬蟲遇到 'cp950' codec can't encode ?
14549|[雙系統] Win10 + Ubuntu 開機選單,讓使用者開機可以選擇系統
13604|[RDP] Windows 10 設定遠端多人多工
9675|[SSL] 自簽憑證過程
7694|[User] Linux 新增使用者並賦予其使用 sudo 的權限
6998|[RDP] Windows 10 新增使用者並賦予遠端桌面權限
6802|[雙系統] 更改開機系統選單的預設值
6533|[RDP] 在 Ubuntu 18.04 使用 xrdp 遠端多人多工
5971|[MQTT] Mosquitto Docker 架設與設定詳細過程
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static IHostBuilder CreateHostBuilder(string[] args) => | |
Host.CreateDefaultBuilder(args) | |
.ConfigureWebHostDefaults(webBuilder => | |
{ | |
webBuilder.UseUrls("http://*:5000").UseStartup<Startup>(); // 使用 UseUrls | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[wrxue@localhost ~]$ sudo systemctl restart nginx # 重啟 nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
location / { | |
proxy_pass http://127.0.0.1:5000; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection keep-alive; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[wrxue@localhost ~]$ sudo mkdir -p /var/www/appName | |
[wrxue@localhost ~]$ sudo cp -R ./shares/publish/* /var/www/appName/ | |
[wrxue@localhost ~]$ cd /var/www/appName/ | |
[wrxue@localhost appName]$ dotnet appName.dll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dotnet publish -c Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[wrxue@localhost ~]$ sudo sed -i 's/SELINUX=enforcing/SELINUX=disabled/1' /etc/selinux/config | |
[wrxue@localhost ~]$ sudo reboot # 重開機 | |
[wrxue@localhost ~]$ sudo sestatus # 查看 SELinux 的狀態,需為 disabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[wrxue@localhost ~]$ sudo firewall-cmd --permanent --zone=public --add-port=5000/tcp # ASP.NET Core 應用程式預設的 Port | |
[wrxue@localhost ~]$ sudo firewall-cmd --permanent --zone=public --add-service=http | |
[wrxue@localhost ~]$ sudo firewall-cmd --reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[wrxue@localhost ~]$ sudo yum install -y epel-release | |
[wrxue@localhost ~]$ sudo yum install -y nginx | |
[wrxue@localhost ~]$ sudo systemctl start nginx | |
[wrxue@localhost ~]$ sudo systemctl enable nginx |
NewerOlder