This is the error bro MERN project I am using github actions for cicd and docker file to build and run on docker container its working on ec2 instance when ever I reload page it shows 404 nginx error.
hello, this works fine in dev but not in prod. i tried using aws route 53 to forward my IP address to a subdomain but it doesn't accept the port (31.212.134.156:8081) only '31.212.134.156'..how can I work around this ?
When using AWS Route 53 to forward traffic to a subdomain, you can't specify a port number (such as 8081). Domain Name System (DNS) services like Route 53 resolve domain names to IP addresses, but they don't handle ports. Since you're using port 8081 for your Go application, you'll need to handle the port forwarding or rerouting in another way. Possible Workarounds is using a Reverse Proxy (Nginx or Apache) Example: server { listen 80; server_name your-subdomain.example.com; location / { proxy_pass localhost:8081; proxy_set_header Host $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; } }
Thanks for sharing
Good work
Good👍
great stuff man! have my appiication up and running in no time
Glad it helped!
Thank you very much
cool, it works!
Thnaks.
hi bro, do we need add secret port, docker username etc?. if that so where to find that in aws
This works seemless
Thank Youu
Thanks
This is the error bro
MERN project
I am using github actions for cicd and docker file to build and run on docker container its working on ec2 instance when ever I reload page it shows 404 nginx error.
are you using any different nginx confguration ?
If I want to send screenshot in comments not there options
hello, this works fine in dev but not in prod. i tried using aws route 53 to forward my IP address to a subdomain but it doesn't accept the port (31.212.134.156:8081) only '31.212.134.156'..how can I work around this ?
When using AWS Route 53 to forward traffic to a subdomain, you can't specify a port number (such as 8081). Domain Name System (DNS) services like Route 53 resolve domain names to IP addresses, but they don't handle ports. Since you're using port 8081 for your Go application, you'll need to handle the port forwarding or rerouting in another way.
Possible Workarounds is using a Reverse Proxy (Nginx or Apache)
Example:
server {
listen 80;
server_name your-subdomain.example.com;
location / {
proxy_pass localhost:8081;
proxy_set_header Host $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;
}
}
Is there instgarm I'd to chat bro