update
This commit is contained in:
11
srcs/Nginx/Dockerfile
Normal file
11
srcs/Nginx/Dockerfile
Normal file
@ -0,0 +1,11 @@
|
||||
FROM nginx:latest
|
||||
|
||||
RUN mkdir -p /etc/nginx/ssl
|
||||
RUN apt install -y openssl
|
||||
RUN openssl req -x509 -nodes -out /etc/nginx/ssl/inception.crt -keyout /etc/nginx/ssl/inception.key -subj "/C=FR/ST=IDF/L=Paris/O=42/OU=42/CN=ptme.com/UID=ptme"
|
||||
RUN mkdir -p /var/www/PTME/
|
||||
RUN mkdir -p /var/www/PTME/static/
|
||||
RUN chmod 755 /var/www/PTME/
|
||||
RUN chown -R www-data:www-data /var/www/PTME/
|
||||
RUN echo "Heyyy\n" > /var/www/PTME/static/text.txt
|
||||
COPY conf/nginx.conf /etc/nginx/nginx.conf
|
33
srcs/Nginx/conf/nginx.conf
Normal file
33
srcs/Nginx/conf/nginx.conf
Normal file
@ -0,0 +1,33 @@
|
||||
user www-data;
|
||||
worker_processes auto;
|
||||
pid /run/nginx.pid;
|
||||
error_log /var/log/nginx/error.log;
|
||||
include /etc/nginx/modules-enabled/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
# multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
client_max_body_size 2G;
|
||||
|
||||
server {
|
||||
server_name ptme.com;
|
||||
listen 443 ssl;
|
||||
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_certificate /etc/nginx/ssl/inception.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/inception.key;
|
||||
|
||||
root /var/www/PTME/;
|
||||
|
||||
location /static/ {
|
||||
alias /var/www/PTME/;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass https://127.0.0.1:5000;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user