Route Godaddy Subdomain to AWS EC2 Nginx Config
This post contains the configurations for the godaddy subdomain to route to aws ec2 with nginx as web server and some configs added to take care of the direct refresh on the end urls.
In Godaddy, create the subdomain and redirect that to AWS EC2 Machine IP (Elastic IP) as A record like below,
This is the AWS EC2 installed nginx config for the subdomain setup. This file mostly presents in the /etc/nginx/nginx.conf
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 4096;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;
server {
server_name dashboard.ngdeveloper.com;
root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
error_page 404 /404.html;
location = /404.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/dashboard.ngdeveloper.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/dashboard.ngdeveloper.com/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
location / {
try_files $uri $uri/ /index.html;
}
}
server {
listen 80;
server_name dashboard.ngdeveloper.com;
return 301 https://dashboard.ngdeveloper.com$request_uri;
}
# dashboard.ngdeveloper.com - 443
server {
listen 443 ssl;
server_name dashboard.ngdeveloper.com;
ssl_certificate /etc/letsencrypt/live/dashboard.ngdeveloper.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/dashboard.ngdeveloper.com/privkey.pem; # managed by Certbot
return 301 https://dashboard.ngdeveloper.com$request_uri;
}
}
Элвис Пресли, безусловно, один из наиболее влиятельных музыкантов в истории. Родившийся в 1935 году, он стал иконой рок-н-ролла благодаря своему харизматичному стилю и неповторимому голосу. Его лучшие песни, такие как “Can’t Help Falling in Love”, “Suspicious Minds” и “Jailhouse Rock”, стали классикой жанра и продолжают восхищать поклонников по всему миру. Пресли также известен своими выдающимися выступлениями и актёрским талантом, что сделало его легендой не только в музыке, но и в кинематографе. Его наследие остается живым и вдохновляет новые поколения артистов. Скачать музыку 2024 года и слушать онлайн бесплатно mp3.
This stage is incredible. The magnificent information uncovers the manager’s excitement. I’m shocked and anticipate additional such mind blowing substance.
This post is a testament to your skill as a writer and thinker.
Your articles provide fresh perspectives.
Vitazen Keto This is really interesting, You’re a very skilled blogger. I’ve joined your feed and look forward to seeking more of your magnificent post. Also, I’ve shared your site in my social networks!
Hi my loved one I wish to say that this post is amazing nice written and include approximately all vital infos Id like to peer more posts like this
Ny weekly very informative articles or reviews at this time.
Fourweekmba Hi there to all, for the reason that I am genuinely keen of reading this website’s post to be updated on a regular basis. It carries pleasant stuff.
Tech to Trick There is definately a lot to find out about this subject. I like all the points you made
Pink Withney I really like reading through a post that can make men and women think. Also, thank you for allowing me to comment!
Mating Press I’m often to blogging and i really appreciate your content. The article has actually peaks my interest. I’m going to bookmark your web site and maintain checking for brand spanking new information.
Blue Techker Pretty! This has been a really wonderful post. Many thanks for providing these details.
Thinker Pedia very informative articles or reviews at this time.
Thinker Pedia This is my first time pay a quick visit at here and i am really happy to read everthing at one place
Jinx Manga For the reason that the admin of this site is working, no uncertainty very quickly it will be renowned, due to its quality contents.
Isla Moon I appreciate you sharing this blog post. Thanks Again. Cool.
Clochant naturally like your web site however you need to take a look at the spelling on several of your posts. A number of them are rife with spelling problems and I find it very bothersome to tell the truth on the other hand I will surely come again again.