Adding redirect for 80 which was causing issues on folder path calls to nginx
This commit is contained in:
parent
f973c67bb4
commit
321734a453
@ -35,14 +35,21 @@ http {
|
|||||||
|
|
||||||
server {
|
server {
|
||||||
server_name "shockrah.xyz";
|
server_name "shockrah.xyz";
|
||||||
location / {
|
|
||||||
root /var/www/shockrah.xyz;
|
root /var/www/shockrah.xyz;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
server {
|
server {
|
||||||
server_name "resume.shockrah.xyz";
|
server_name "resume.shockrah.xyz";
|
||||||
location / {
|
|
||||||
root /var/www/resume.shockrah.xyz;
|
root /var/www/resume.shockrah.xyz;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ =404;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,21 @@ resource "aws_lb_target_group" "shockrah_xyz" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "aws_lb_listener" "http" {
|
||||||
|
load_balancer_arn = aws_lb.alpha.arn
|
||||||
|
port = 80
|
||||||
|
protocol = "HTTP"
|
||||||
|
default_action {
|
||||||
|
type = "redirect"
|
||||||
|
|
||||||
|
redirect {
|
||||||
|
port = 443
|
||||||
|
protocol = "HTTPS"
|
||||||
|
status_code = "HTTP_301"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
resource "aws_lb_listener" "https" {
|
resource "aws_lb_listener" "https" {
|
||||||
load_balancer_arn = aws_lb.alpha.arn
|
load_balancer_arn = aws_lb.alpha.arn
|
||||||
port = 443
|
port = 443
|
||||||
|
Loading…
Reference in New Issue
Block a user