Skip to content

Commit

Permalink
settings nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
marcopestrin committed Jul 15, 2024
1 parent f7d04ba commit 0f8a76a
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,20 @@ sudo cp -Rp build/* /var/www/vhosts/frontend/build

echo "Setting up Nginx configuration"
cd /etc/nginx/sites-enabled
# sudo nano /etc/nginx/sites-available/react
rm -rf /etc/nginx/sites-enabled/default # eventually

# settings Nginx
echo 'server {
listen 80 default_server;
server_name _;
location / {
autoindex on;
root /var/www/vhosts/frontend/build;
try_files $uri /index.html;
}
}' | sudo tee /etc/nginx/sites-available/react >/dev/null

sudo ln -s /etc/nginx/sites-available/react /etc/nginx/sites-enabled/

# Add www-data to ubuntu group
Expand Down

0 comments on commit 0f8a76a

Please sign in to comment.