Blog/docker/nginx.conf
Vezpi b9b4d0bf8b
All checks were successful
Deploy / Deploy (push) Successful in 6s
add: docker folder for image build
2025-06-02 08:02:23 +00:00

27 lines
419 B
Nginx Configuration File

map $http_accept_language $lang {
default en;
~fr fr;
}
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Redirect users to their language home page
rewrite ^/$ /$lang/ redirect;
location / {
try_files $uri $uri/ =404;
}
# Custom 404 page
error_page 404 /$lang/404.html;
location = /$lang/404.html {
internal;
}
}