Setting up NGINX server in the cloud server
1 min readJun 9, 2024
NGINX can be used as proxy server or web server when running application on the cloud. Below are the steps to setup nginx server on the ubuntu
- Connect to the server using
ssh root@ip_address
- Install nginx server by following below commands(Skip this step if already installed)
sudo apt update
sudo apt install nginx # installing nginx server
sudo systemctl start nginx # starting nginx server
sudo systemctl enable nginx # enable nginx server
3. After successful installation you should find
/etc/nginx/sites-available/default
file
4. You should be able to see nginx server success message like below when you access production server.
Useful information about nginx server:
- Below are commands to start/stop/restart nginx server
# Start nginx server
sudo service nginx start
# Stop nginx server
sudo service nginx stop
# Restart nginx server
sudo service nginx restart
- Refer log files
/var/log/nginx/access.log
and/var/log/nginx/error.log
for any issues
Happy Learning!!!