Where to find default/ test page for Apache2

15,922

Solution 1

My solution:

Add a new virtual host for the ip address in the file located at \etc\apache2\sites-available\000-default.conf as <VirtualHost *:80> and change ServerName to the IP.

In \etc\apache2\sites-available\default-ssl.conf (if you have ssl enabled) as

<VirtualHost *:443>

and change ServerName to the IP.

Solution 2

Make sure the html home page file is in /var/www, and is called index.html - index.html is the first/default webpage you should get on typing the sites domain name/IP address. All other files can be linked to & from the index.html root/home file.

Share:
15,922

Related videos on Youtube

wolfy1339
Author by

wolfy1339

Updated on September 18, 2022

Comments

  • wolfy1339
    wolfy1339 over 1 year

    I have a VPS running Ubuntu 13.10 and has an Apache2 website, and whenever I go to the VPS's IP http://5.231.37.8 ,I get the default/test page for Apache instead of my website located in /var/www.

    It's an html + css website.

    Edit: My solution below

  • wolfy1339
    wolfy1339 over 10 years
    My website is in /var/www but it won't load if i directly go to my VPS's ip address. Only loads if i go to mywebsite.com
  • Wilf
    Wilf over 10 years
    Even http://???.???.?.??/index.html? Could be the wrong IP address...
  • wolfy1339
    wolfy1339 over 10 years
    no, it wasn't incorrect
  • wolfy1339
    wolfy1339 over 10 years
    That's where my website is as stated in my question.