mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-08 23:25:03 -04:00
cd: parametrize listen port
This commit is contained in:
parent
105b21badc
commit
4eaa75c843
2 changed files with 19 additions and 2 deletions
15
startup.sh
Executable file
15
startup.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Generate the nginx.conf with PORT env or default to 80
|
||||
cat > /etc/nginx/conf.d/default.conf <<EOF
|
||||
server {
|
||||
listen ${PORT:-80};
|
||||
server_name localhost;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files \$uri \$uri/ /index.html;
|
||||
}
|
||||
}
|
||||
EOF
|
Loading…
Add table
Add a link
Reference in a new issue