Sign inSign up

martadinata666/apache

By martadinata666

Updated almost 3 years ago

apache + fpm + yacron combo for easy web deploy

Image
0

2.6K

martadinata666/apache repository overview

Apache

apache-image

pipeline status

Tags

  • fpm (included php-fpm)
  • fcgid (apache only)

Compose fcgid

version: 3.8
services:
  web: martadinata666/apache:fcgid
   volumes:
      - /web/root:/var/www/html

Compose fpm

version: 3.8
services:
  web: martadinata666/apache:fpm
   volumes:
      - /web/root:/var/www/html
Deployment
  • depends on personal use case override apache conf
  volumes:
    - ./apache.conf:/etc/apache2/sites-available/000-default.conf
    - ./apache-ssl.conf:/etc/apache/sites-available/000-default-ssl.conf

Reverse proxy

Minimal
<VirtualHost *:443>

        SSLEngine on
        SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
        SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
   
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        
        ProxyPreserveHost On
        ProxyPass "/" "http://replace-with-container-name:replace-with-container-port/"
        ProxyPassReverse "/" "http://replace-container-name:replace-with-container-port/"
        
        ProxyRequests Off
        <Proxy *>
          Order deny,allow
          Allow from all
        </Proxy>
        
        <Location />
          Order allow,deny
          Allow from all
        </Location>

</VirtualHost>

Sample with websockets
<VirtualHost *:443>
  #ServerName sub.domain.com
  SSLEngine On
  #SSLCertificateFile /path/to/ssl/cert/crt
  #SSLCertificateKeyFile /path/to/ssl/key/key
  
  # Protocol 'h2' is only supported on Apache 2.4.17 or newer.
  #Protocols h2 http/1.1
  
  SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
  SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
  
  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined
  
  ProxyPreserveHost On
  ProxyPass / http://replace-with-container-name:replace-with-container-port/
  ProxyPassReverse / http://replace-with-container-name:replace-with-container-port/
  
  RewriteEngine on
  RewriteCond %{HTTP:Upgrade} websocket [NC]
  RewriteCond %{HTTP:Connection} upgrade [NC]
  RewriteRule ^/?(.*) "ws://replace-with-container-name:replace-with-container-port/$1" [P,L]
</VirtualHost>

Tag summary

Content type

Image

Digest

sha256:bade7caf3

Size

221.3 MB

Last updated

almost 4 years ago

docker pull martadinata666/apache