Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yc_edge
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wubi
yc_edge
Commits
f9d00421
Commit
f9d00421
authored
Mar 07, 2025
by
wubi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加nginx
parent
942d294a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
174 additions
and
0 deletions
+174
-0
nginx.conf
nginx.conf
+174
-0
No files found.
nginx.conf
0 → 100644
View file @
f9d00421
user
www-data
;
worker_processes
auto
;
pid
/run/nginx.pid
;
include
/etc/nginx/modules-enabled/*.conf
;
events
{
worker_connections
768
;
# multi_accept on;
}
http
{
##
# Basic Settings
##
sendfile
on
;
tcp_nopush
on
;
types_hash_max_size
2048
;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include
/etc/nginx/mime.types
;
default_type
application/octet-stream
;
##
# SSL Settings
##
ssl_protocols
TLSv1
TLSv1.1
TLSv1.2
TLSv1.3
;
# Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers
on
;
##
# Logging Settings
##
access_log
/var/log/nginx/access.log
;
error_log
/var/log/nginx/error.log
;
##
# Gzip Settings
##
gzip
on
;
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
#自定义变量 $connection_upgrade
map
$http_upgrade
$connection_upgrade
{
default
keep-alive
;
#默认为keep-alive 可以支持 一般http请求
'websocket'
upgrade
;
#如果为websocket 则为 upgrade 可升级的。
}
server
{
listen
8011
;
server_name
localhost
;
# location / {
# root /app/ui;
# index index.html index.htm;
# try_files $uri $uri/ /index.html;
# }
# location /thingskit-scada {
# alias /app/scada;
# index index.html index.htm;
# try_files $uri $uri/ /index.html;
# }
#location / {
# proxy_pass http://192.168.0.73:5777/;
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "Upgrade";
# proxy_set_header Host $host;
# proxy_cache_bypass $http_upgrade;
# }
location
/
{
root
/app/ui
;
index
index.html
index.htm
;
try_files
$uri
$uri
/
/index.html
;
}
location
/red/
{
proxy_pass
http://127.0.0.1:3001/
;
proxy_http_version
1
.1
;
proxy_set_header
Upgrade
$http_upgrade
;
proxy_set_header
Connection
"Upgrade"
;
proxy_set_header
Host
$host
;
proxy_cache_bypass
$http_upgrade
;
}
location
~
^/entity/(\d+)(/.*)
{
set
$port
$1
;
set
$rest
$2
;
set
$node_red_proxy_host
http://127.0.0.1:
$port$rest
?
$args
;
add_header
X-Proxy-Port
$node_red_proxy_host
;
proxy_pass
$node_red_proxy_host
;
proxy_set_header
Host
$host
;
proxy_set_header
X-Real-IP
$remote_addr
;
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for
;
proxy_set_header
X-Forwarded-Proto
$scheme
;
}
location
/api/
{
proxy_pass
http://192.168.0.113:8081
;
proxy_http_version
1
.1
;
proxy_set_header
Upgrade
$http_upgrade
;
proxy_set_header
Connection
"Upgrade"
;
proxy_set_header
Host
$host
;
proxy_cache_bypass
$http_upgrade
;
}
location
/yt/
{
proxy_pass
http://192.168.0.113:8081
;
proxy_http_version
1
.1
;
proxy_set_header
Upgrade
$http_upgrade
;
proxy_set_header
Connection
"Upgrade"
;
proxy_set_header
Host
$host
;
proxy_cache_bypass
$http_upgrade
;
}
location
/upload/
{
proxy_pass
http://192.168.0.113:8081
;
proxy_http_version
1
.1
;
proxy_set_header
Upgrade
$http_upgrade
;
proxy_set_header
Connection
"Upgrade"
;
proxy_set_header
Host
$host
;
proxy_cache_bypass
$http_upgrade
;
}
}
include
/etc/nginx/conf.d/*.conf
;
include
/etc/nginx/sites-enabled/*
;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment