Welcome! Log In Create A New Profile

Advanced

Здравствуйте!

June 18, 2010 09:53AM
Есть CentOS 5.4 версия nginx 0.8.36, связка nginx+php_fpm. Как сделать редирект при обращении к http://site.com на http://www.site.com ?
Вот конфиг
[code]
server {
listen 80;
server_name site.com www.site.com;
location / {
root /var/www/html/site.com;
index home.php index.php;
include /etc/nginx/mime.types;
charset utf-8;
default_type application/octet-stream;
access_log /var/log/nginx/site_access_log main;
error_log /var/log/nginx/site_error_log;
keepalive_timeout 0;
server_tokens off;
#gzip on;
#gzip_buffers 5 6k;
#gzip_comp_level 7;
#gzip_proxied any;
#gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascri$

sendfile on;
proxy_buffering on;
#output_buffers 1 256k;
client_max_body_size 2000m;
tcp_nopush on;
tcp_nodelay on;
location ~ \.flv$ {
flv;
}
location ~ /\.ht {
deny all;
}

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/html/mapkc.org$fastcgi_script_name;
include fastcgi_params;
}

[/code]

Если дублирую тему и где то решение уже есть, не пинайте сильно, обыскал и перерыл уже все
Subject Author Posted

Здравствуйте!

server801 June 18, 2010 09:53AM

Re: Здравствуйте!

vgoncharov June 18, 2010 10:26AM

Re: Здравствуйте!

Gena Makhomed June 18, 2010 10:32AM

Re: Здравствуйте!

server801 June 18, 2010 10:49AM

Re: Редирект на www

server801 June 18, 2010 10:56AM

Re: Здравствуйте!

Igor Sysoev June 18, 2010 11:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 89
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