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

Docker - How to serve local file automatically #393

Open
oers opened this issue Mar 11, 2025 · 1 comment
Open

Docker - How to serve local file automatically #393

oers opened this issue Mar 11, 2025 · 1 comment

Comments

@oers
Copy link

oers commented Mar 11, 2025

Is there a way / configuration that allows me to specify a file that is automatically displayed when I use docker?

Specifically I want to provide a techradar under https://techradar.mycompany and user should just open the url and get the radar.

I have setup a apache2 proxy with proxy pass rule. And I really struggle with a way to serve the CSV File directly. Any hints are very welcome.

@oers
Copy link
Author

oers commented Mar 12, 2025

This is my current approach with apache 2 but this will show the location of the techradar.csv in the browser header.
Still not the best version.

<IfModule mod_ssl.c>
        <VirtualHost *:443>
                ServerName techradar.corp

                SSLEngine on
                SSLProxyEngine on
                SSLCertificateFile      /etc/ssl/certs/techradar.crt
                SSLCertificateKeyFile /etc/ssl/private/techradar.key

                ErrorLog ${APACHE_LOG_DIR}/error.log
                CustomLog ${APACHE_LOG_DIR}/access.log combined
                ProxyPass / "http://localhost:8080/"
                ProxyPassReverse / "http://localhost:8080/"

                RewriteEngine on
                RewriteCond %{REQUEST_URI} ^/$
                RewriteCond %{QUERY_STRING} ^$
                RewriteRule / "https://techradar.corp/?documentId=https://techradar.corp/files/TechRadar.csv" [L]
       </VirtualHost>
</IfModule>
<VirtualHost *:80>
        ServerName techradar.de.ebpgroup.corp
        Redirect permanent / https://techradar.corp/
</VirtualHost>

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

No branches or pull requests

1 participant