G
G
grom2020-09-28 16:31:51
Apache HTTP Server
grom, 2020-09-28 16:31:51

Why does not display styles on the page when raising the frontend on the server?

Hello everyone, the essence of the question is this: when raising the frontend project locally on the server, for some reason it displays only the index.html layout , and styles and .js files, etc. does not pull up.
There is a Dockerfile structure :

FROM ubuntu:18.04

RUN apt-get -y update
RUN apt-get -y install apache2


RUN mkdir -p /usr/src/app/
WORKDIR /usr/src/app/

COPY . /usr/src/app/

ADD index.html /var/www/html/index.html

CMD ["/usr/sbin/apache2ctl", "-DFOREGROUND"]


EXPOSE 80

I did not touch the Apache configuration file , i.e. default.conf is standard
. Any suggestions what it could be?
Having entered the container, the files for the front were pulled off everything ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
unseriously, 2020-09-28
@unseriously

curl -I http://localhost/css/bootstrap.css ---> Content Type - what does it say?
If Plain text, then you need to adjust mimetypes:
https://www.youtube.com/watch?v=YDYblioxbqQ&list=P...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question