Apache: Difference between revisions

From Alpine Linux
Line 10: Line 10:
And create an index.html file to test if everything is ok:
And create an index.html file to test if everything is ok:


{{Cmd|#vi index.html
{{Cmd|#vi index.html}}


<html>
And add the following lines:
 
{{Cmd|<html>
<head>
<head>
<title> My first page </title>
<title> My first page </title>
Line 19: Line 21:
<h1>It works!</h1>
<h1>It works!</h1>
</body>
</body>
</html>
</html>}}


That done, let us start apache2 web server:
That done, let us start apache2 web server:

Revision as of 16:07, 27 December 2013

Installing Apache

Add the Apache2 package with the command:

#apk add apache2

Move to the directory where your site will resides:

#cd /var/www/localhost/htdocs

And create an index.html file to test if everything is ok:

#vi index.html

And add the following lines:

<html> <head> <title> My first page </title> </head> <body>

It works!

</body>

</html>

That done, let us start apache2 web server:

rc-service apache2 start

Now you can create your html site and host in this directory.