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>
  • What happens when you request the URL with the IP address? – Ladadadada Dec 13 '13 at 0:14
  • when you go to 54.214.246.243 you are in fact redirected to 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 0: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 0: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 0: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 0:51
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)

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.