Sign inSign up

pasthortown/php74-apache-laravel

By pasthortown

•Updated over 5 years ago

Image
0

203

pasthortown/php74-apache-laravel repository overview


docker-compose.yml

version: '2.4'

networks:
  myapp:
    ipam:
      config:
        - subnet: 172.80.0.0/24

services:
  app:
    image: pasthortown/php74-apache-laravel
    restart: always
    ports:
    - 8888:80
    volumes:
    - ./myapp:/var/www/html/
    - ./config/000-default.conf:/etc/apache2/sites-available/000-default.conf
    networks:
      myapp:
        ipv4_address: 172.80.0.14
  redis:
    image: redis:latest
    restart: always
    ports:
    - 6379:6379


config/000-default.conf

<VirtualHost :80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/public
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>


myapp/public/.htaccess

<IfModule mod_rewrite.c>
    <IfModule> mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .
 - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Send Requests To Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

Tag summary

Content type

Image

Digest

Size

257.1 MB

Last updated

over 5 years ago

docker pull pasthortown/php74-apache-laravel