Apache: Difference between revisions

From Alpine Linux
(Formatting and adding links to related pages, homepage)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Installing Apache==
The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows.
Add the Apache2 package with the command:


{{Cmd|#apk add apache2}}
== Simple Setup ==


Move to the directory where your site will resides:
Add the {{Pkg|apache2}} package:


{{Cmd|#cd /var/www/localhost/htdocs}}
{{Cmd|# apk add apache2}}


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


{{Cmd|#vi index.html
{{Cmd|# rc-service apache2 start}}


<html>
Navigate a browser to the machine's address; there you should see the default "It works" page.
<head>
<title> My first page </title>
</head>
<body>
<h1>It works!</h1>
</body>
</html>


That done, let us start apache2 web server:
Enable apache on startup (if needed):


{{Cmd|rc-service apache2 start}}
{{Cmd|# rc-update add apache2}}


Now you can create your html site and host in this directory.
Edit the configuration in {{Path|/etc/apache2/}} and run
 
{{Cmd|# rc-service apache2 restart}}
 
to enable your changes
 
== Additional Guides ==
 
* [[Apache with php-fpm]]
* [[Apache authentication: NTLM Single Signon]]
 
== See Also ==
 
* [https://httpd.apache.org/ Apache Homepage]
 
[[Category:Web Server]]

Latest revision as of 16:33, 14 May 2023

The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows.

Simple Setup

Add the apache2 package:

# apk add apache2

Start the service:

# rc-service apache2 start

Navigate a browser to the machine's address; there you should see the default "It works" page.

Enable apache on startup (if needed):

# rc-update add apache2

Edit the configuration in /etc/apache2/ and run

# rc-service apache2 restart

to enable your changes

Additional Guides

See Also