I am going through the David Malan lecture on php.
So I have created a simple google.html
file on /public_html/google.html
which is as follows:
<!DOCTYPE html>
<html>
<head>
<title>Google</title>
</head>
<body>
<div style = "text-align: center">
<h1>Google</h1>
<form action = "http://www.google.com/search" method = "get">
<input name = "q" style = "width: 400px" type = "text">
<br>
<input type = "submit" value = "Google Search">
<input type = "submit" value = "I am feeling lucky">
</form>
</div>
</body>
</html>
When I tried to open http://localhost/~anupam/google.html, I got the
ERROR 404
Not Found The requested URL /~anupam/google.html was not found on this server.
Apache/2.4.7 (Ubuntu) Server at localhost Port 80
Why am I unable to display it through localhost? I am running apache2.
http://localhost/google.html
?/home/YOUR_LOGIN/public_html/
, not in/public_html/
./public_html
? Do you mean/public_html
as you have written or is it~/public_html
? What is this lecture you're talking about? What does it suggest you do?