Where to find default/ test page for Apache2
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.
Related videos on Youtube
wolfy1339
Updated on September 18, 2022Comments
-
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 over 10 yearsMy 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 over 10 yearsEven
http://???.???.?.??/index.html
? Could be the wrong IP address... -
wolfy1339 over 10 yearsno, it wasn't incorrect
-
wolfy1339 over 10 yearsThat's where my website is as stated in my question.