Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: Drawpile Server Administration using RestAPI through NGINX reverse proxy

$
0
0
In addition to the information given by Andrzej A. Flip (from https://superuser.com/questions/1254358/replace-single-line-with-multline-content-within-the-file-nginx-conf/1254557#1254557 ), you need to escape the semicolon (;), asterisk (*), and forward slash (/) characters. The \n makes it a new line, and use -i.bak to make a backup of the file before making the change with an .bak extension.

sudo sed -i.bak 's/^ include \/etc\/nginx\/sites-enabled\/\*\;$/&\n \n server {\n listen 8081\;\n \n location \/ {\n proxy_pass http:\/\/127.0.0.1:8080\/\;\n proxy_redirect default\;\n auth_basic "Server Administration"\;\n auth_basic_user_file \/etc\/nginx\/passwords\;\n }\n}\n/' /home/pi/Public/NGINX-test/nginx.conf

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>