aboutsummaryrefslogtreecommitdiff
path: root/srcs/nginx/src
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-10-28 13:21:51 +0100
committerCharles Cabergs <me@cacharle.xyz>2020-10-28 13:21:51 +0100
commit9331a07c32297a7aa68089d17f0c30e7c08bde13 (patch)
tree5c31ed1135200b8336e3af994d8b38d25b5dcdd8 /srcs/nginx/src
parentaf1504d72a3be36a26a27632184320abd64d1297 (diff)
downloadft_services-9331a07c32297a7aa68089d17f0c30e7c08bde13.tar.gz
ft_services-9331a07c32297a7aa68089d17f0c30e7c08bde13.tar.bz2
ft_services-9331a07c32297a7aa68089d17f0c30e7c08bde13.zip
Added nginx reverse proxy to phpmyadmin
Diffstat (limited to 'srcs/nginx/src')
-rw-r--r--srcs/nginx/src/ft_services.conf16
1 files changed, 11 insertions, 5 deletions
diff --git a/srcs/nginx/src/ft_services.conf b/srcs/nginx/src/ft_services.conf
index 642dc8c..cfce45f 100644
--- a/srcs/nginx/src/ft_services.conf
+++ b/srcs/nginx/src/ft_services.conf
@@ -6,19 +6,25 @@ server {
ssl_certificate_key /root/ft_services_key.pem;
server_name localhost;
- index index.html index.htm;
- root /www;
+ index index.html index.htm;
+ root /www;
location / {
try_files $uri $uri/ =404; # if uri or uri/ not valid, 404 error
}
location /wordpress {
- return 307 https://$host:5050;
+ return 307 http://$host:5050;
}
- location /phpmyadmin {
- proxy_pass https://$host:5000;
+ location /phpmyadmin/ {
+ index index.php;
+ proxy_pass http://phpmyadmin-service:5000/;
+ 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;
+ proxy_redirect /index.php /phpmyadmin/index.php;
}
}