zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Nginx charset

July 7, 2011 by Igor Drobot 1 Comment

I set up a new virtual host on my nginx web-server only for directory listing of my iso-image collection.
Some of my folders had cyrillic names and they were unfortunately not readable:

With a tiny (charset) option its possible to force a specific charset, here it is:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
server {
        server_name zeldor.biz;
        listen   [::]:80;
        server_tokens off;
        charset   utf-8;
        autoindex on;
 
        location / {
                root   some_path;
                auth_basic "Marvin said: No!";
                auth_basic_user_file  some_path;
                access_log  some_path;
                error_log   some_path;
        }
}

server { server_name zeldor.biz; listen [::]:80; server_tokens off; charset utf-8; autoindex on; location / { root some_path; auth_basic "Marvin said: No!"; auth_basic_user_file some_path; access_log some_path; error_log some_path; } }

Filed Under: Linux Tagged With: charset, cyrillic, Nginx, nginx charset

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Comments

  1. Андрей says

    September 12, 2016 at 10:11

    Спасибо, помогло.

Leave a Reply

Your email address will not be published. Required fields are marked *

Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok