Apache
Apache HTTP Server is Apache HTTP Server, used for HTTP Server HTML . Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server
Prepare
When referring to this document to use Apache HTTP Server, please read and ensure the following points:
-
This application is installed by Websoft9 console.
-
The purpose of this application complies with the LGPL-2.1 open source license agreement.
-
Configure the domain name or server security group opens external network ports for application access.
Getting started
Websoft9 provides Apache applications for two purposes:
- Running static websites
- Reverse proxy service (Not recommended)
The Apache container does not include PHP, so if you want to deploy a PHP website, run the PHP container through the Websoft9 console.
Deploy a static website
-
After installing Apache via the Websoft9 Console, view the application details under My Apps and get the access information from the Access tab.
-
Click on the URL to see a static page for demo purposes.
-
Refer to: Deploying Applications Based on Program Environment to deploy a static website.
Mount the httpd.conf configuration file
The Apache configuration file can be modified with the sed
command, but it is recommended to mount it outside the container:
-
Enter the Apache container and copy the contents of the file: /usr/local/apache2/conf/httpd.conf
-
Select My apps > Apache > Compose, then access the Git repository page of your Apache application.
-
Paste the copied
httpd.conf
contents into ./src/httpd.conf, and then modify the docker-compose.yml volume mount settings. -
Rebuild the container to apply the changes.
Configuration options
- Apache container port:
80
- CLI:
httpd -h
- Apache Official documentation
- Apache Container Usage Guide
- Apache configuration file:/usr/local/apache2/conf/httpd.conf
Administer
Troubleshooting
You don't have permission...?
Error details: You don't have permission to access this server
Solution:
- Check the permissions of the web directory
- Verify that the Apache configuration file includes AllowOverride All Require all granted directives.
Frequent 403 Errors in Apache?
A 403 error indicates that access is prohibited or denied. This error can occur in two scenarios:
- The server has been passively attacked by a high volume of requests (DoS or DDoS attack), causing the server to be unable to provide normal service.
- The server's active defense measures (such as Apache's mod_evasive module) have triggered. This may happen if an IP address sends a high number of requests in a short period, causing the server to implement its DoS defense policy and refuse service to that IP address.