Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
nginx-proxy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
nginx-proxy
Commits
c5c0153b
Commit
c5c0153b
authored
Jul 21, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
missing
parent
9164b6aa
Pipeline
#39289
passed with stages
in 41 minutes and 2 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
src/site.ts
src/site.ts
+4
-0
views/nginx.conf.mustache
views/nginx.conf.mustache
+6
-0
No files found.
src/site.ts
View file @
c5c0153b
...
@@ -26,6 +26,7 @@ export interface SiteRenderData {
...
@@ -26,6 +26,7 @@ export interface SiteRenderData {
disableTop
?:
boolean
;
disableTop
?:
boolean
;
serverExtra
?:
string
[];
serverExtra
?:
string
[];
locationExtra
?:
string
[];
locationExtra
?:
string
[];
locationExtraPre
?:
string
[];
htpasswd
?:
string
;
htpasswd
?:
string
;
cors
?:
boolean
;
cors
?:
boolean
;
}
}
...
@@ -58,6 +59,7 @@ export interface PhpRenderData extends FileRenderData {
...
@@ -58,6 +59,7 @@ export interface PhpRenderData extends FileRenderData {
php
:
true
;
php
:
true
;
upstream
:
string
;
upstream
:
string
;
phpExtra
?:
string
[];
phpExtra
?:
string
[];
phpExtraPre
?:
string
[];
}
}
export
interface
RedirectRenderData
extends
SiteRenderData
{
export
interface
RedirectRenderData
extends
SiteRenderData
{
...
@@ -168,6 +170,7 @@ async function getSiteData(
...
@@ -168,6 +170,7 @@ async function getSiteData(
expires
:
parser
.
getString
(
'
EXPIRES
'
)
||
'
10m
'
,
expires
:
parser
.
getString
(
'
EXPIRES
'
)
||
'
10m
'
,
upstream
:
targetUrl
.
host
,
upstream
:
targetUrl
.
host
,
phpExtra
:
parser
.
getArray
(
'
PHP_EXTRA
'
),
phpExtra
:
parser
.
getArray
(
'
PHP_EXTRA
'
),
phpExtraPre
:
parser
.
getArray
(
'
PHP_EXTRA_PRE
'
),
}
as
PhpRenderData
;
}
as
PhpRenderData
;
}
else
if
(
targetUrl
.
protocol
.
startsWith
(
'
redirect+
'
))
{
}
else
if
(
targetUrl
.
protocol
.
startsWith
(
'
redirect+
'
))
{
specificRenderData
=
{
specificRenderData
=
{
...
@@ -218,6 +221,7 @@ async function getSiteData(
...
@@ -218,6 +221,7 @@ async function getSiteData(
disableTop
:
parser
.
getBoolean
(
'
DISABLE_TOP
'
),
disableTop
:
parser
.
getBoolean
(
'
DISABLE_TOP
'
),
serverExtra
:
parser
.
getArray
(
'
SERVER_EXTRA
'
),
serverExtra
:
parser
.
getArray
(
'
SERVER_EXTRA
'
),
locationExtra
:
parser
.
getArray
(
'
LOCATION_EXTRA
'
),
locationExtra
:
parser
.
getArray
(
'
LOCATION_EXTRA
'
),
locationExtraPre
:
parser
.
getArray
(
'
LOCATION_EXTRA_PRE
'
),
htpasswd
:
basicPasswords
.
length
htpasswd
:
basicPasswords
.
length
?
`/etc/nginx/generated/htpasswd-
${
domain
}
`
?
`/etc/nginx/generated/htpasswd-
${
domain
}
`
:
undefined
,
:
undefined
,
...
...
views/nginx.conf.mustache
View file @
c5c0153b
...
@@ -231,6 +231,9 @@ http {
...
@@ -231,6 +231,9 @@ http {
{{/
serverExtra
}}
{{/
serverExtra
}}
location / {
location / {
{{#
locationExtraPre
}}
{{
.
}}
{{/
locationExtraPre
}}
{{#
proxy
}}
{{#
proxy
}}
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Forwarded "for=$remote_addr;by=$hostname";
proxy_set_header Forwarded "for=$remote_addr;by=$hostname";
...
@@ -306,6 +309,9 @@ http {
...
@@ -306,6 +309,9 @@ http {
{{#
php
}}
{{#
php
}}
location ~ \.php$ {
location ~ \.php$ {
{{#
phpExtraPre
}}
{{
.
}}
{{/
phpExtraPre
}}
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass
{{
upstream
}}
;
fastcgi_pass
{{
upstream
}}
;
fastcgi_index
{{
index
}}
;
fastcgi_index
{{
index
}}
;
...
...
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