Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customizing Apache configuration #388

Open
Cyanat opened this issue Nov 4, 2022 · 6 comments
Open

Customizing Apache configuration #388

Cyanat opened this issue Nov 4, 2022 · 6 comments

Comments

@Cyanat
Copy link

Cyanat commented Nov 4, 2022

Hi,
I'm using the apache phpMyAdmin Docker image.
I would like to customize the apache configuration of the conainter adding a file in /etc/apache2/sites-enabled/ (to enable https on port 443).
How should store my .conf in this folder when starting this image? Do I have to use -v /host/ssl.conf:/etc/apache2/sites-enabled/ssl.conf ? Or is there another way to manage the apache configuration of this docker image (environment variables, entrypoint.sh, dockerfile...) ?
Thanks!

@williamdes
Copy link
Member

Hi,

I think this is a good idea to add a configuration folder to load user configs. It would simply the SSL setup that is currently not possible.

@williamdes
Copy link
Member

Here is some configuration changes we do:

sed -i "s/VirtualHost \*:80/VirtualHost \*:${APACHE_PORT}/" /etc/apache2/sites-enabled/000-default.conf

@Cyanat
Copy link
Author

Cyanat commented Nov 7, 2022

Hi,

I think this is a good idea to add a configuration folder to load user configs. It would simply the SSL setup that is currently not possible.

Indeed, I was expecting something like that after seeing that the apache folder was including folder site_enabled and sites-available.

Until there, I managed to store my own conf files in site_enabled using a Dockerfile:

FROM phpmyadmin/phpmyadmin:5.2.0

ADD ssl.conf /etc/apache2/sites-enabled/ssl.conf

I'm not really comfortable with docker yet, not sure it's the right way to do it but... seems to work.

@williamdes
Copy link
Member

williamdes commented Nov 7, 2022

Hi @Cyanat

If this is the only change you do you could use a docker volume

image: phpmyadmin:5.2
volumes:
    - "./ssl.conf:/etc/apache2/sites-enabled/ssl.conf:ro"

By the way please use the official image phpmyadmin, see: #363

@Cyanat
Copy link
Author

Cyanat commented Nov 7, 2022

You're right, I switched to the official image.

For now, it's the only change, so I know using a volume would be easier, but I prefer if the conf file is stored in the container only, not on host.

Thanks for your help and advice.

@williamdes
Copy link
Member

Okay, I am happy it works fine for you now. Let's keep track of further progress to implement a folder for config files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants