Projet 42: Sujet: Conteneuriser un serveur wordpress à l'aide de docker, alpine/debian, nginx et mariadb
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

56 lines
1.4 KiB

server {
listen 80;
listen [::]:80;
server_name localhost;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name localhost;
ssl_certificate /var/ssl/inception.pem;
ssl_certificate_key /var/ssl/inception.pem;
ssl_protocols TLSv1.2 TLSv1.3;
root /var/www/html/public;
index index.php index.html;
location / {
try_files $uri $uri/ =404;
}
location /wordpress {
root /var/www;
try_files $uri $uri/ /wordpress/index.php?$args;
location ~ /wordpress/(.+\.php)$ {
include fastcgi_params;
fastcgi_pass wordpress:9000;
fastcgi_index index.php;
fastcgi_intercept_errors on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
}
}
location ~ /adminer(\.php)$ {
root /var/www/wordpress;
try_files $uri $uri/ /adminer.php?$args;
include fastcgi_params;
fastcgi_pass wordpress:9000;
fastcgi_index index.php;
fastcgi_intercept_errors on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
}
location /git/ {
proxy_pass http://gitea:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}