Closed nuevakenia closed 2 years ago
Hi!
The lighttpd service is started with the container, and is basically what keeps the container running, if you stop/restart the process, the container will restart. But I don't think you need to restart the process to load your configuration!
When it comes to your specific issue, it looks like you only change a single line in the "base" configuration, that is supplied in the image, which would be easier to add to its own configuration file. When the container starts lighttpd it uses a single configuration file which in turn loads all config files from the following two places:
"/etc/lighttpd/conf.d/*.conf"
"/usr/local/lighttpd.d/*.conf"
So if you only want to add the url.rewrite clause, I would recommend just adding that as its own config:
FROM jitesoft/lighttpd
COPY --from=build-stage /app/dist /var/www/html/
RUN echo 'url.rewrite-if-not-file = ("/.*" => "/index.html")' > /etc/lighttpd/conf.d/urlrewrite.conf
And it should load the configuration as you need it to.
Thanks a lot @Johannestegner for your response and develop! i have fixed pasting my new .conf in the usr/local/lighttpd.d after is created.
i will try your code since looks lighter.
Thanks a lot!
# ##############################################
FROM jitesoft/lighttpd as deploy-stage
COPY --from=build-stage /app/dist /var/www/html/
WORKDIR /usr/local/lighttpd.d
COPY lighttpd2.conf .
Hi, i cant figure out how i can reload, stop or restart the lighttpd, im shure im missing something, maybe the way i want to do things.
this is my workflow on my dockerfile:
After copy the file
lighttpd2.conf
i want to reload the server with this file as the config. i dont know if im doing everything wrong, but any clue would be apreciate. btw, this is my lighttpd2.confbasically i want to get rid of 404 errors on my vuejs3/vite website and i found this is a way.