I'm trying to configure default.conf
in /etc/nginx/conf.d
to show a simple landing page located at /home/ubuntu/project-source/company/entry/index.html
.
The domains are set up correctly as far as I know to point to the server
A: test24.company.io -> <aws-elastic-IP>
default.conf:
server {
listen 80;
server_name localhost;
index index.html;
location / {
root /home/ubuntu/project-source/company/entry;
}
}
server {
server_name test24.company.io www.test24.company.io;
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/test24.company.io/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/test24.company.io/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = test24.company.io) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name test24.company.io www.test24.company.io;
return 404; # managed by Certbot
}
Additional question: the project will run 2 processes on 2 subdomains lets say sub1
and sub2
and they will run on localhost:3001
and localhost:3002
respectively, how do I configure default.conf
to point/proxy to these processes as well?