Skip to content

Commit

Permalink
update nginx config
Browse files Browse the repository at this point in the history
Signed-off-by: Kang Huaishuai <[email protected]>
  • Loading branch information
khs1994 committed Nov 10, 2023
1 parent 3d66b0f commit 074da34
Show file tree
Hide file tree
Showing 26 changed files with 51 additions and 35 deletions.
2 changes: 1 addition & 1 deletion config/nginx/demo-satis.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
server {
server_name packagist.t.khs1994.com;
listen 443 http2;
listen 443 ssl;
root /app/satis/output;

include conf.d/demo-include-ssl.config;
Expand Down
2 changes: 1 addition & 1 deletion config/nginx/demo-ssl.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ server {
}

server{
listen 443 ssl http2;
listen 443 ssl;
server_name www.t.khs1994.com;
index index.html index.htm index.php;

Expand Down
4 changes: 2 additions & 2 deletions config/nginx/demo-www.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ server {
}

server{
listen 443 ssl http2;
listen 443 ssl;
server_name www.t.khs1994.com t.khs1994.com;
root /app/demo/public;
index index.html index.htm index.php;
Expand All @@ -33,7 +33,7 @@ server {
#

server {
listen 443 ssl http2;
listen 443 ssl;
server_name laravel.t.khs1994.com;
root /app/laravel/public;
index index.html index.htm index.php;
Expand Down
2 changes: 1 addition & 1 deletion config/nginx/demo.config/docker-registry.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ map $upstream_http_docker_distribution_api_version $docker_distribution_api_vers
}

server {
listen 443 ssl http2;
listen 443 ssl;
# fix me
server_name REGISTRY_DOMAIN;

Expand Down
4 changes: 2 additions & 2 deletions config/nginx/demo.config/docker.mirror.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server {
listen 443 ssl http2;
listen 443 ssl;
server_name mirror.t.khs1994.com;
include conf.d/demo-include-ssl.config;

Expand Down Expand Up @@ -45,7 +45,7 @@ server {
}

server {
listen 443 ssl http2;
listen 443 ssl;
server_name gcr.t.khs1994.com;
include conf.d/demo-include-ssl.config;

Expand Down
2 changes: 1 addition & 1 deletion config/nginx/demo.config/fzjh.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ upstream fzjh {
}

server {
listen 443 ssl http2;
listen 443 ssl;
server_name fzjh.t.khs1994.com;
location / {
proxy_pass http://fzjh;
Expand Down
2 changes: 1 addition & 1 deletion config/nginx/demo.config/gitlab.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ upstream gitlab_server {
}

server {
listen 443 ssl http2;
listen 443 ssl;

#
# please edit
Expand Down
2 changes: 1 addition & 1 deletion config/nginx/demo.config/gogs.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ upstream git {
}

server {
listen 443 ssl http2;
listen 443 ssl;
server_name git.t.khs1994.com;
ssl_certificate conf.d/demo-ssl/t.khs1994.com.crt;
ssl_certificate_key conf.d/demo-ssl/t.khs1994.com.key;
Expand Down
2 changes: 1 addition & 1 deletion config/nginx/demo.config/http3.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ server {
# Enable QUIC and HTTP/3.
listen 443 quic reuseport;
# Ensure that HTTP/2 is enabled for the server
listen 443 ssl http2;
listen 443 ssl;
server_name localhost;

http2_push_preload on;
Expand Down
2 changes: 1 addition & 1 deletion config/nginx/demo.config/laravel.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ server {
#

server {
listen 443 ssl http2;
listen 443 ssl;
server_name laravel.t.khs1994.com;
root /app/laravel/public;
index index.html index.htm index.php;
Expand Down
2 changes: 1 addition & 1 deletion config/nginx/demo.config/minio.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server {
listen 443 ssl http2;
listen 443 ssl;
server_name minio.t.khs1994.com minio.local;
location / {
proxy_buffering off;
Expand Down
2 changes: 1 addition & 1 deletion config/nginx/demo.config/ppm.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server {
listen 443 ssl http2;
listen 443 ssl;
server_name laravel.t.khs1994.com;
root /app/laravel/public;

Expand Down
2 changes: 1 addition & 1 deletion dockerfile/nginx/conf.d/http3-quic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ server{

server{
# listen 443 ssl;
listen 443 ssl http2;
listen 443 ssl;
# http3 只能在一个 server 中配置
# listen 443 http3 reuseport; # UDP listener for QUIC+HTTP/3
server_name quic2.t.khs1994.com;
Expand Down
2 changes: 1 addition & 1 deletion docs/nginx/https.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ server {
}

server{
listen 443 ssl http2;
listen 443 ssl;
server_name www.t.khs1994.com;

# 「重要」 此处为容器内路径(注意不是本机路径)! 本机 ./app/ 对应容器内 /app/
Expand Down
2 changes: 1 addition & 1 deletion drone/config/nginx/demo-drone.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ server {
}

server {
listen 443 ssl http2;
listen 443 ssl;
server_name drone.{{ CI_DOMAIN }};
ssl_certificate conf.d/ssl/{{ CI_DOMAIN }}.crt;
ssl_certificate_key conf.d/ssl/{{ CI_DOMAIN }}.key;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ server {

server {
# listen 443 quic reuseport;
listen 443 ssl http2;
listen 443 ssl;

server_name laravel.t.khs1994.com laravel2.t.khs1994.com;
index index.php index.html;
Expand Down Expand Up @@ -44,7 +44,7 @@ server {
}

server {
listen 443 ssl http2;
listen 443 ssl;

server_name www.t.khs1994.com;
index index.php index.html;
Expand Down Expand Up @@ -78,7 +78,7 @@ server {
}

server {
listen 443 ssl http2;
listen 443 ssl;

server_name test.t.khs1994.com;
index index.php index.html;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ server {
}

server {
listen 443 ssl http2;
listen 443 ssl;

server_name development.t.khs1994.com laravel.t.khs1994.com laravel2.t.khs1994.com;
index index.php index.html;
Expand Down Expand Up @@ -42,7 +42,7 @@ server {
}

server {
listen 443 ssl http2;
listen 443 ssl;

server_name www.t.khs1994.com;
index index.php index.html;
Expand Down Expand Up @@ -76,7 +76,7 @@ server {
}

server {
listen 443 ssl http2;
listen 443 ssl;

server_name test.t.khs1994.com;
index index.php index.html;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ server {
}

server {
listen 443 ssl http2;
listen 443 ssl;

server_name production.t.khs1994.com laravel.t.khs1994.com laravel2.t.khs1994.com;
index index.php index.html;
Expand Down Expand Up @@ -42,7 +42,7 @@ server {
}

server {
listen 443 ssl http2;
listen 443 ssl;

server_name www.t.khs1994.com;
index index.php index.html;
Expand Down Expand Up @@ -76,7 +76,7 @@ server {
}

server {
listen 443 ssl http2;
listen 443 ssl;

server_name test.t.khs1994.com;
index index.php index.html;
Expand Down
20 changes: 18 additions & 2 deletions lnmp-docker
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ server {
}
server{
listen 443 ssl http2;
listen 443 ssl;
server_name $1;
root ${LNMP_PHP_PATH:-/app}/$2;
index index.html index.htm index.php;
Expand Down Expand Up @@ -1530,7 +1530,23 @@ $ ./lnmp-docker ssl-self khs1994.com *.khs1994.com *.t.khs1994.com 127.0.0.1 ...
;;

pwsh )
print_info "please open https://docs.microsoft.com/zh-cn/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1"
command -v pwsh && pwsh || true
command -v pwsh && exit || true
if [ $OS = 'Darwin' ];then
# Download the powershell '.tar.gz' archive
curl -L -o $HOME/Downloads/powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v7.3.9/powershell-7.3.9-osx-x64.tar.gz
# Create the target folder where powershell is placed
sudo mkdir -p /usr/local/microsoft/powershell/7.3.9
# Expand powershell to the target folder
sudo tar zxf $HOME/Downloads/powershell.tar.gz -C /usr/local/microsoft/powershell/7.3.9
# Set execute permissions
sudo chmod +x /usr/local/microsoft/powershell/7.3.9/pwsh
# Create the symbolic link that points to pwsh
sudo ln -s /usr/local/microsoft/powershell/7.3.9/pwsh /usr/local/bin/pwsh
exit
fi

print_info "please open https://docs.microsoft.com/zh-cn/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.3"
;;

* )
Expand Down
2 changes: 1 addition & 1 deletion lrew/laravel/config/laravel.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server {
listen 443 ssl http2;
listen 443 ssl;

server_name laravel-docker.t.khs1994.com;

Expand Down
2 changes: 1 addition & 1 deletion lrew/pcit/conf/pcit.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
server {
# 更改端口号

listen 10000 ssl http2;
listen 10000 ssl;

# 更改 CI 的域名

Expand Down
2 changes: 1 addition & 1 deletion lrew/pcit/conf/pcit.fpm.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
server {
# 更改端口号

listen 10000 ssl http2;
listen 10000 ssl;

# 更改 CI 的域名

Expand Down
2 changes: 1 addition & 1 deletion lrew/pcit/conf/pcit.proxy.frontend.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
server {
# 更改端口号

listen 10000 ssl http2;
listen 10000 ssl;

# 更改 CI 的域名

Expand Down
2 changes: 1 addition & 1 deletion windows/config/nginx/www.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ upstream fastcgi_php {
}

server {
listen 443 ssl http2;
listen 443 ssl;
server_name demo.t.khs1994.com;
root C:/Users/90621/lnmp/app/demo/public;

Expand Down
2 changes: 1 addition & 1 deletion windows/config/nginx/www.container.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ upstream fastcgi_php {
}

server {
listen 443 ssl http2;
listen 443 ssl;
server_name demo.t.khs1994.com;
root C:/Users/90621/lnmp/app/demo/public;

Expand Down
2 changes: 1 addition & 1 deletion wsl/nginx/demo-ssl.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# listen 443 ssl http2;
# listen 443 ssl;

ssl_certificate conf.d/demo-ssl/t.khs1994.com.crt;
ssl_certificate_key conf.d/demo-ssl/t.khs1994.com.key;
Expand Down

0 comments on commit 074da34

Please sign in to comment.