I have a domain name called dumbdom.com
.
I have an elastic IP for my AWS EC2 instance called my.ela.stic.ip
.
The htdocs root of my linux based EC2 instance is at /var/www/html/
.
I have set up the /etc/httpd/conf.d/vhost.conf
file to direct the domain dumbdom.com
to /var/www/html/my_dumb_app/
and that's working Fine! The vhost.conf
file looks like this:
NameVirtualHost *
<VirtualHost *>
ServerName dumbdom.com
DocumentRoot /var/www/html/my_dumb_app
</VirtualHost>
<VirtualHost *>
ServerName blog.dumbdom.com
DocumentRoot /var/www/html/my_blog_directory
</VirtualHost>
Now, I want dumbdom.com
& blog.dumbdom.com
to keep landing on to /var/www/html/my_dumb_app/
& /var/www/html/my_blog_directory
respectively; and i also want everything else via my.ela.stic.ip
address to simply go to /var/www/html
like normal. So that going to dumbdom.com
and going to my.ela.stic.ip/my_dumb_app
would end up landing at the same location.
It just so happens that since my vhost.conf file has <VirtualHost>
tags for dumbdom.com
& blog.dumbdom.com
, trying to reach other directories of the server through the elastic_ip causes a 404-NotFound
error.
Thanks