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; } }