Reputation: 59
I have a main web app on Amazon ElasticBeanstalk and all the DNS records are already set correctly. But I need a subdomain to redirect to a different IP address (to my lightsail instance).
So I added a new A record in the same hosted zone like so:
However, when I visit ctgze.domain.com
, the site won't load. However, if I access the IP address directly, it loads fine (shows the default Apache index.html
since I have my virtualhost for my app configured for ctgze.domain.com
.
I have configured apache like so:
<VirtualHost *:80>
ServerName ctgze.domain.com
ServerAdmin root@localhost
WSGIScriptAlias / /var/www/domain/domain.wsgi
<Directory /var/www/domain/domain/>
Order allow,deny
Allow from all
</Directory>
Alias /static /var/www/domain/domain/static
<Directory /var/www/domain/domain/static/>
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Why is it not working?
Upvotes: 0
Views: 1055
Reputation: 59
It was a browser cache issue.
I tried to access my subdomain using curl
and it loaded. But in Chrome it times out.
I tried clearing my cache/loading in incognito and it worked.
Upvotes: 2