Set web directory

main
bashrc 2026-02-23 20:53:26 +00:00
parent a5f7099d7b
commit 6546131ba8
2 changed files with 6 additions and 6 deletions

View File

@ -343,8 +343,8 @@ if [ -f /usr/bin/pacman ]; then
web_dir=/srv/http
fi
if [ ! -d /var/www/${I2P_DOMAIN}/htdocs ]; then
mkdir -p /var/www/${I2P_DOMAIN}/htdocs
if [ ! -d "${web_dir}/${I2P_DOMAIN}/htdocs" ]; then
mkdir -p "${web_dir}/${I2P_DOMAIN}/htdocs"
fi
echo "Creating nginx virtual host for http://${I2P_DOMAIN}"
@ -368,7 +368,7 @@ echo "Creating nginx virtual host for http://${I2P_DOMAIN}"
echo ' index index.html;';
echo '';
echo ' location /newsmirror {';
echo " root /var/www/${I2P_DOMAIN}/htdocs;";
echo " root ${web_dir}/${I2P_DOMAIN}/htdocs;";
echo ' try_files $uri =404;';
echo ' }';
echo '';

View File

@ -248,8 +248,8 @@ if [ -f /usr/bin/pacman ]; then
web_dir=/srv/http
fi
if [ ! -d "/var/www/[${YGGDRASIL_ADDRESS}]/htdocs" ]; then
mkdir -p "/var/www/[${YGGDRASIL_ADDRESS}]/htdocs"
if [ ! -d "${web_dir}/[${YGGDRASIL_ADDRESS}]/htdocs" ]; then
mkdir -p "${web_dir}/[${YGGDRASIL_ADDRESS}]/htdocs"
fi
echo "Creating nginx virtual host for http://[${YGGDRASIL_ADDRESS}]"
@ -274,7 +274,7 @@ echo "Creating nginx virtual host for http://[${YGGDRASIL_ADDRESS}]"
echo ' index index.html;';
echo '';
echo ' location /newsmirror {';
echo " root /var/www/[${YGGDRASIL_ADDRESS}]/htdocs;";
echo " root ${web_dir}/[${YGGDRASIL_ADDRESS}]/htdocs;";
echo ' try_files $uri =404;';
echo ' }';
echo '';