Welcome! Log In Create A New Profile

Advanced

set charset

XIT
December 23, 2013 09:04AM
Доброго времени.

nginx/1.4.3, конфигурация nginx: http://pastebin.com/sQ4CXK0m, установолен
из репов убунты сервера.

Задача отдавать контент в нужной кодировке: utf-8. Добавил charset utf-8;,
но соответствующего заголовка, как описано в документации
http://nginx.org/ru/docs/http/ngx_http_charset_module.html#charset, не
появляется.

Сам текст в отдаваемом index.php на кириллице:
$ file index.php
index.php: HTML document, UTF-8 Unicode text


Конфиг сайта:
server {
listen 80;

charset utf-8;

root /home/user/www/site1;
index index.php index.html index.htm;

server_name site1;


location / {
try_files $uri $uri/ /index.html;
}

error_page 404 /404.html;

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/www;
}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;

}
}



Заранее спасибо за любую подсказку.


--
Relax, take it easy!
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

set charset

XIT December 23, 2013 09:04AM

Re: set charset

XIT December 23, 2013 11:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 166
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready