INSTALLATION.md and nginx install script improvements for nohttps

merge-requests/341/head
Thomas Lynch 1 year ago
parent 6e20e83036
commit 8989ed1e34
Signed by: fatchan
GPG Key ID: A7E5E8B7E11EE92D
  1. 7
      INSTALLATION.md
  2. 6
      configs/nginx/nginx.sh

@ -27,16 +27,15 @@
```bash
sudo apt update -y
sudo apt install curl wget gnupg nginx ffmpeg imagemagick graphicsmagick python-certbot-nginx fonts-dejavu -y
sudo apt install curl wget gnupg nginx ffmpeg imagemagick graphicsmagick python3-certbot-nginx fonts-dejavu -y
```
**3. Install MongoDB**
[MongoDB Installation](https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/#install-mongodb-community-edition-on-debian):
```bash
#NOTE: this installs mongodb 4.4 for compatibility reasons only. Newer versions (6.x) are recommended)
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "deb http://repo.mongodb.org/apt/debian $(lsb_release -sc)/mongodb-org/4.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
echo "deb http://repo.mongodb.org/apt/debian $(lsb_release -sc)/mongodb-org/6.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt update -y
sudo apt install -y mongodb-org
sudo systemctl enable --now mongod

@ -122,6 +122,7 @@ EOF
"
fi
if [ "$NOHTTPS" != "y" ]; then
HTTPS_MIDSECTION="
listen [::]:443 ssl ipv6only=on;
listen 443 ssl;
@ -140,7 +141,8 @@ server {
server_name $CLEARNET_SERVER_NAME;
return 444;
"
"
fi
#onion_location redirect header
ONION_LOCATION=""
@ -236,7 +238,7 @@ echo "Writing main jschan vhost config..."
printf "$JSCHAN_CONFIG" > /etc/nginx/sites-available/$SITES_AVAILABLE_NAME
sudo ln -s -f /etc/nginx/sites-available/$SITES_AVAILABLE_NAME /etc/nginx/sites-enabled/$SITES_AVAILABLE_NAME
if [ "$NOHTTPS" == "Y" ]; then
if [ "$NOHTTPS" == "y" ]; then
echo "Adjusting config snippets to support NOHTTPS mode..."
sudo sed -i "s/Forwarded-Proto https/Forwarded-Proto http/g" /etc/nginx/snippets/jschan_clearnet_routes.conf
fi

Loading…
Cancel
Save