1

I've just set up route 53 on AWS to link my server (ubuntu) to a godaddy domain name. I used to be able to access my /var/www/mmf folder from the elastic IP address given by aws (54.214.246.243/mmf) and since I've set up the route 53 service and linked it to the directory of my website, I can only access it through the domain address (www.meetmyfriends.co).

My problem is that I have other directories on this same server I would like to access, I usually did 54.214.246.243/myotherdirectory to access other projects that didn't need any domain name. And now I can't.

Why is this happening ? How can I fix this ?

I want to be able to access my www server folder from my ip address 54.214.246.243 and the mmf sub directory (my website) from the web address in the same time. So i can still access the other projects on development I have on this server. How can I set that up.

Thanks for your help :)

EDIT:

Maybe is this due to my httpd-vhosts.conf file:

NameVirtualHost *:80

<VirtualHost *:80>
    ServerName www.meetmyfriends.co
    DocumentRoot /var/www/mmf
</VirtualHost>


<VirtualHost *:80>
    ServerName meetmyfriends.co
    DocumentRoot /var/www/mmf
</VirtualHost>
Miles M.
  • 371
  • 1
  • 3
  • 11
  • What happens when you request the URL with the IP address? – Ladadadada Dec 13 '13 at 00:14
  • when you go to http://54.214.246.243/ you are in fact redirected to http://54.214.246.243/mmf And I would like to be able to access the root directory from this address to be able to access any other directory from there (for my other projects). But when accessing the server from the web address (www.meetmyfriends.co) I'd like it to go directly to the /mmf directory (this part is fine, but avoid me from accessing root directory anymore). – Miles M. Dec 13 '13 at 00:34
  • 1
    Do you have another vhost and/or a .htaccess file? Include them both in the question if so. – Ladadadada Dec 13 '13 at 00:46
  • no .htaccess file, my vhosts are above, I think I'm redirecting everything to /var/www/mmf when I just want the traffic coming from the web address / domain to be redirected to this specific address. So that when I access the server from the ip address, I can still work on my other projects. I this a good solution to use 1 server for multiples purpose ? – Miles M. Dec 13 '13 at 00:50
  • I just visited the IP and I was not redirected to /mmf. I suspect it loaded the content from the /var/www/mmf directory but this is not the same as the server returning a redirect to a different URL. – Ladadadada Dec 13 '13 at 00:51
  • If that's your only vhost, you need another one with a different DocumentRoot. I guess your old DocumentRoot was /var/www? – Ladadadada Dec 13 '13 at 00:52
  • yes, you don't see the redirect process, I wanted it to be this way, when you go to www.meet.. then the url should show the root directory. But I'd like that when goign to the IP address given by elasticIP, I arrive on the root directory /var/www/ So you are saying I should use another vhost for the IP address ? I don't know much about how all of this work – Miles M. Dec 13 '13 at 01:09

1 Answers1

1

From Apache documentation:

Main host goes away
If you are adding virtual hosts to an existing web server, you must also create a block for the existing host. The ServerName and DocumentRoot included in this virtual host should be the same as the global ServerName and DocumentRoot. List this virtual host first in the configuration file so that it will act as the default host.

List your default server first (usually people use 000-default if you have an /etc/apache2/sites-enabled directory)

omribahumi
  • 341
  • 2
  • 4