Skip to content

Commit

Permalink
add surf nginx init file
Browse files Browse the repository at this point in the history
  • Loading branch information
dale-wahl committed Jul 17, 2024
1 parent 5e984e1 commit 6b9cb0b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docker/surf_init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# Define the Nginx configuration file path
nginx_conf="/etc/nginx/conf.d/ssl_main.conf"

# Let Nginx serve the docker container running on port 8080 instead of a static web page
sed -i 's|root /var/www/html;|location \/ {\n \tproxy_pass http:\/\/localhost:8080;\n \tproxy_set_header Host $host;\n \tproxy_set_header X-Real-IP $remote_addr;\n }|' "$nginx_conf"
sed -i 's|index index.html index.htm;||' "$nginx_conf"

systemctl restart nginx.service

0 comments on commit 6b9cb0b

Please sign in to comment.