I tried to run STRAPI CMS on my VPS.
App runs via PM2 and internal curl is ok, I see response from app
curl -v http://127.0.0.1:1337
But external curl is problem, nowadays I want to access just it via http://89.221.222.178:8090 (just for testing before switch to "domain mode").
curl -v http://89.221.222.178:8090
* Rebuilt URL to: http://89.221.222.178:8090/re (v6)
* Trying 89.221.222.178...LLOW Anywhere (v6)
* TCP_NODELAY set ALLOW Anywhere (v6)
* connect to 89.221.222.178 port 8090 failed: Connection refused
* Failed to connect to 89.221.222.178 port 8090: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 89.221.222.178 port 8090: Connection refusedata.poutnicesty.cz
Firewall allowed ports
...
sudo ufw status
8090 ALLOW Anywhere
8090/tcp ALLOW Anywhere
8090/tcp (v6) ALLOW Anywhere (v6)
...
Nginx conf:
server {
listen 8090;
listen [::]:8090;
root /var/www/data.poutnicesty.cz/;
index index.html index.htm index.nginx-debian.html;
server_name 89.221.222.178:8090;
gzip on;
gzip_types text/plain application/xml text/css application/javascript;
gzip_min_length 1000;
access_log /var/log/nginx/data.poutnicesty.cz.access.log;
error_log /var/log/nginx/data.poutnicesty.cz.error.log;
port_in_redirect off;
proxy_set_header Host $host:$server_port;
location / {
proxy_pass http://127.0.0.1:1337;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass_request_headers on;
}
}
I thought it is enough just allow port (for other "subdomain" it worked, ex: port :8050 - but there I tested that with nuxt app, not strapi).
Any idea?
Thanks a lot.