Skip to content

Commit

Permalink
Merge pull request #13 from the1Riddle/web-debugging
Browse files Browse the repository at this point in the history
this is awesome
  • Loading branch information
the1Riddle authored Dec 18, 2023
2 parents 675a75a + f480a0b commit 2c801e4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions 0x0F-load_balancer/0-custom_http_response_header
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# configure web-02 to be identical to web-01

sudo apt-get -y update
sudo apt install -y nginx
sudo ufw allow 'Nginx HTTP'
echo "Hello World" | sudo tee /var/www/html/index.html
echo "Ceci n'est pas une page" > 404.html
sudo mv 404.html /var/www/html
echo "server {
listen 80 default_server;
listen [::]:80 default_server;
add_header X-Served-By $HOSTNAME;
root /var/www/html;
index index.html;
location /redirect_me {
return 301 https://github.com/the1Riddle
}
error_page 404 /404.html;
location = /404.html{
internal;
}
}" > default

sudo mv -f default /etc/nginx/sites-available/default
sudo service nginx restart
Empty file modified 0x0F-load_balancer/1-install_load_balancer
100644 → 100755
Empty file.

0 comments on commit 2c801e4

Please sign in to comment.