mirror of
https://github.com/linuxserver/docker-baseimage-alpine-nginx.git
synced 2026-02-20 01:03:46 +08:00
Split apart init scripts Include dhparams Include ssl.conf Include resolver.conf generation Include worker_processes.conf generation use nginx.conf and default site config formatted like swag (formatted similar to upstream nginx)
37 lines
941 B
Plaintext
37 lines
941 B
Plaintext
## Version 2021/10/05 - Changelog: https://github.com/linuxserver/docker-baseimage-alpine-nginx/commits/master/root/defaults/default
|
|
|
|
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
listen 443 ssl http2 default_server;
|
|
listen [::]:443 ssl http2 default_server;
|
|
|
|
root /config/www;
|
|
index index.html index.htm index.php;
|
|
|
|
server_name _;
|
|
|
|
# all ssl related config moved to ssl.conf
|
|
include /config/nginx/ssl.conf;
|
|
|
|
client_max_body_size 0;
|
|
|
|
location / {
|
|
# enable the next two lines for http auth
|
|
#auth_basic "Restricted";
|
|
#auth_basic_user_file /config/nginx/.htpasswd;
|
|
|
|
try_files $uri $uri/ /index.html /index.php?$args =404;
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
fastcgi_index index.php;
|
|
include /etc/nginx/fastcgi_params;
|
|
}
|
|
}
|
|
|
|
# enable proxy cache for auth
|
|
proxy_cache_path cache/ keys_zone=auth_cache:10m;
|