VPS

Table of Contents

Got a new VPS from Vultr

https://vultr.com/ Visit here to know more.

So I signed up for Vultr and got a VPS.

OS: Debian 12 x64
RAM: 1024.00 MB
Storage: 25.00 GB
Location: Frankfurt
Label: atulya-server

I am having issue with PayPal for now, but I did got this running, let’s see for how long.

Commands that I have executed till now:

$ apt update
$ apt upgrade

For check the usage stats of system.

$ top

Setting up Nginx:

$ apt install nginx

It is install at /usr/etc/nginx

The config to edit is nginx.conf

Run Nginx server:

$ nginx

Error on Server:

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()

To check which service is using port:

$ netstat -tulpn | grep :80

Check the status of server:

$ sudo systemctl status nginx

Allow the HTTP port too.

root@atulya-server:/etc/nginx# sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere                  
22/tcp (v6)                ALLOW       Anywhere (v6)             

root@atulya-server:/etc/nginx# sudo ufw allow http
Rule added
Rule added (v6)
root@atulya-server:/etc/nginx# sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere                  
80/tcp                     ALLOW       Anywhere                  
22/tcp (v6)                ALLOW       Anywhere (v6)             
80/tcp (v6)                ALLOW       Anywhere (v6)             

root@atulya-server:/etc/nginx# 

Nginx commands:

$ nginx -s reload

For checking the syntax

$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful