Skip to content

Commit

Permalink
Run Nginx as Nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
the1Riddle committed Dec 19, 2023
1 parent bd61f8f commit 63629a5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions 0x12-web_stack_debugging_2/1-run_nginx_as_nginx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
# configuring a container to run nginx under nginx user on port 8080
# without using apt-get remove
chown nginx:nginx /etc/nginx/nginx.conf
chown nginx:nginx /etc/nginx/sites-available/default
chmod u+rwx /etc/nginx/nginx.conf
sed -i "s/#user www-data/user nginx/" /etc/nginx/nginx.conf
sed -i "s/80/8080/" /etc/nginx/sites-available/default
pkill apache2
su nginx service nginx restart

0 comments on commit 63629a5

Please sign in to comment.