@Stephen Wartel Both commands are used to copy a file from one location to another and reload the Nginx service. The first command copies the default.conf
file from /home
to /etc/nginx/conf.d/
and then reloads the Nginx service using the -s reload
option. The second command copies the nginx.conf
file from /home/site/
to /etc/nginx/sites-available/default
and then reloads the Nginx service using the service nginx reload
command.
In regard to what route to take, I would use the below call. The article you mentioned that uses this call was recently published, was written by a Microsoft Employee, and the author showcases an end-to-end proven solution.
@Stephen Wartel Both commands are used to copy a file from one location to another and reload the Nginx service. The first command copies the default.conf
file from /home
to /etc/nginx/conf.d/
and then reloads the Nginx service using the -s reload
option. The second command copies the nginx.conf
file from /home/site/
to /etc/nginx/sites-available/default
and then reloads the Nginx service using the service nginx reload
command.
Here is a step-by-step walkthrough to create, save, and persist the command using Azure portal SSH in your App Service:
- Open the Azure portal and navigate to your App Service.
- In the left-hand menu, click on "SSH" under the "Development Tools" section.
- Click "Go" to open the SSH session in your browser.
- Once you are connected to the SSH session, navigate to the home directory by typing
cd ~
. - Create a new file named
startup.sh
by typingnano startup.sh
. - Type or paste the command you want to run at startup into the file.
- Save the file by pressing
Ctrl+X
, thenY
, thenEnter
. - Make the file executable by typing
chmod +x startup.sh
. - Exit the SSH session by typing
exit
. - In the Azure portal, navigate to your App Service and click on "Configuration" in the left-hand menu.
- Scroll down to the "Startup Command" section and enter the following command:
bash /home/startup.sh
. - Click "Save" to persist the changes.
By following these steps, your startup.sh
command should be saved and persist across server restarts. If you still encounter issues with persistence after following the above 12 steps, please reply here so we can investigate the matter further with you.