files: add nginx config file

This commit is contained in:
ziguayungui 2024-03-26 14:52:34 +00:00
parent 1914037205
commit 59d2951856
4 changed files with 61 additions and 2 deletions

View File

@ -86,6 +86,8 @@ jobs:
sed -i 's/ unofficial/ oversea/' ib/Makefile
ls packages/all | cut -d "_" -f 1 | xargs -n1 sh -c 'rm ib/packages/$0*.ipk'
cp packages/all/*.ipk ib/packages/
mkdir -p ib/files
cp -a files/all/* ib/files
case ${IB_URL} in
*x86*)
cp src/repositories_x86_64.conf ib/repositories.conf
@ -108,7 +110,7 @@ jobs:
- name: Build
run: |
echo "istoreos-intl - *" >> ib/target.manifest
cd ib && make -f multi.mk image_multi
cd ib && make -f multi.mk image_multi FILES="files"
- name: Pack
run: |

View File

@ -0,0 +1,24 @@
config main global
option uci_enable 'true'
config server '_lan'
list listen '443 ssl default_server'
list listen '[::]:443 ssl default_server'
option server_name '_lan'
list include 'restrict_locally'
list include 'conf.d/*.locations'
option uci_manage_ssl 'self-signed'
option ssl_certificate '/etc/nginx/conf.d/_lan.crt'
option ssl_certificate_key '/etc/nginx/conf.d/_lan.key'
option ssl_session_cache 'shared:SSL:32k'
option ssl_session_timeout '64m'
option access_log 'off; # logd openwrt'
config server '_lan80'
list listen '80'
list listen '[::]:80'
option server_name '_lan80'
list include 'restrict_locally'
list include 'conf.d/*.locations'
option access_log 'off; # logd openwrt'

View File

@ -0,0 +1,32 @@
# Consider using UCI or creating files in /etc/nginx/conf.d/ for configuration.
# Parsing UCI configuration is skipped if uci set nginx.global.uci_enable=false
# For details see: https://openwrt.org/docs/guide-user/services/webserver/nginx
worker_processes auto;
user root;
events {}
http {
access_log off;
log_format openwrt
'$request_method $scheme://$host$request_uri => $status'
' (${body_bytes_sent}B in ${request_time}s) <- $http_referer';
include mime.types;
default_type application/octet-stream;
sendfile on;
client_max_body_size 32k;
large_client_header_buffers 4 32k;
gzip on;
gzip_vary on;
gzip_proxied any;
root /www;
#UCI_HTTP_CONFIG
include conf.d/*.conf;
}

View File

@ -32,7 +32,8 @@ image_multi:
$(MAKE) -s _check_profile
$(MAKE) -s _check_keys
(unset PROFILE FILES PACKAGES MAKEFLAGS; \
$(MAKE) -f multi.mk -s _call_image_multi )
$(MAKE) -f multi.mk -s _call_image_multi \
$(if $(FILES),USER_FILES="$(FILES)") )
profiles_multi:
@$(STAGING_DIR_HOST)/bin/sed -n 's/^CONFIG_TARGET_$(if $(CONFIG_TARGET_MULTI_PROFILE),DEVICE_)$(call target_conf,$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET)))_\(.*\)=y/\1/p' .config