Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

132
Vistas
Is there a way to add custom apache site.conf with docker-compose and active it?

I want use docker as backend after some years with LAMP, I'm using docker with docker-compose.

Here docker-compose.yml:

services:
    php:
        image: php:8.0-apache
        container_name: php
        restart: always
        ports:
            - "80:80"
        volumes:
            - /var/www/docker/php:/var/www/html
            - ./conf:/etc/apache2/sites-available
        links:
            - db:db
    db:
        image: mysql
        container_name: db
        restart: always
        volumes:
            - ~/mysql:/var/lib/mysql
        ports:
            - "3306:3306"
        environment:
            - MYSQL_ROOT_PASSWORD=root
    admin:
        image: phpmyadmin/phpmyadmin
        container_name: admin
        ports:
            - "8080:80"
        links:
            - db:db

So I erase /etc/apache2/sites-available who already contain 000-default.conf with my local.dev.conf:

<VirtualHost *:80>
    DocumentRoot /var/www/html/
    ServerName local.dev
    <Directory /var/www/html/>
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

I put a basic index.php file in /var/www/html in container that displays 'test' but it only displays at http://localhost and I want it at http://local.dev

I saw there is a file docker-php.conf but how to change it cause erase 000-default.conf seems change nothing?

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda