Skip to content

Commit

Permalink
feat: 调整 reuseport 启用位置
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Dec 7, 2023
1 parent 7e685dd commit b26f75f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/services/website.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,9 @@ func (r *WebsiteImpl) SaveConfig(config requests.SaveConfig) error {
vStr := cast.ToString(v)
if v == 443 && config.Ssl {
vStr = ` listen 443 ssl;
listen [::]:443 ssl;
listen [::]:443 ssl;
listen 443 quic;
listen [::]:443 quic;`
listen [::]:443 quic;`
port.WriteString(vStr)
if i != len(ports)-1 {
port.WriteString("\n")
Expand Down
6 changes: 4 additions & 2 deletions scripts/openresty/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,10 @@ EOF
cat > ${openrestyPath}/conf/default.conf << EOF
server
{
listen 80 default_server;
listen 443 ssl default_server;
listen 80 default_server reuseport;
listen [::]:80 default_server reuseport;
listen 443 ssl default_server reuseport;
listen [::]:443 ssl default_server reuseport;
server_name _;
index index.html;
root /www/server/openresty/html;
Expand Down

0 comments on commit b26f75f

Please sign in to comment.