I am trying to containerize all things related to my web app (Vue.js) using Docker Compose, including Nginx & SSL Certificates (Certbot) on a VPS OVH Debian+Apache.
I have this error :
"The proxy server could not handle the request
Reason: Error during SSL Handshake with remote server"
If anyone can spot where I am going wrong, I would be extremely grateful!
Docker-compose.yml
services:
my-app-prod:
container_name: my-app-prod
build:
context: .
dockerfile: Dockerfile-prod
ports:
- '8080:80'
- '4567:443'
Dockerfile-prod
FROM node:12.2.0-alpine as build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json /app/package.json
RUN npm install --silent
RUN npm install @vue/[email protected] -g
COPY . /app
RUN npm run build
# production environment
FROM nginx:1.16.0-alpine
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
EXPOSE 443
CMD ["nginx", "-g", "daemon off;"]
sites-avalaibles/nom-de-domaine.fr.conf
ServerName nom-de-domaine.fr
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
ProxyPassReverseCookieDomain 127.0.0.1 nom-de-domaine.fr
RewriteEngine on
RewriteCond %{SERVER_NAME} = nom-de-domaine.fr
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
sites-avalaibles/nom-de-domaine.fr-le-ssl.conf
<VirtualHost *:443>
ServerName nom-de-domaine.fr
# ProxyPreserveHost On
# SSLProxyEngine On
# SSLProxyVerify none
# SSLProxyCheckPeerCN off
# SSLProxyCheckPeerName off
# SSLProxyCheckPeerExpire off
# SSLEngine on
SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
ProxyPass / https://127.0.0.1:4567/
ProxyPassReverse / https://127.0.0.1:4567/
ProxyPassReverseCookieDomain 127.0.0.1 nom-de-domaine.fr
SSLCertificateFile /etc/letsencrypt/live/ nom-de-domaine.fr /fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/ nom-de-domaine.fr/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/ nom-de-domaine.fr /chain.pem
Include /etc/letsencrypt/options-ssl-apache.conf
CustomLog "/var/log/apache2/ nom-de-domaine.fr _log" "%h %l %u %t \"%r\" %>s %b"
</VirtualHost>
</IfModule>
CMD ["nginx", "-g", "daemon off;"]. What made you add it to the Dockerfile?