I registered a domain in GoDaddy.I setup a few items in my A records:


In my ubuntu server apache virtual host setting:

subdomain.mydomain.com -> /var/www/subdomain mydomain.com -> /var/www/public_html

It works. But there is an issue. When I key in an ip address in my browser, the /var/www/ directory will be listed.My question is how can I configure to redirect the ip address to /var/www/public_html and disable /var/www directory listing?

  • 2
    You should spend some time reading the documentation on name based virtual hosting.
    – user9517
    May 21 '14 at 15:22
  • Any suggestion?
    – Bagusflyer
    May 22 '14 at 14:47

Your Answer

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

Browse other questions tagged or ask your own question.