MyTetra Share
Делитесь знаниями!
Nginx - типовая настройка сайта
Время создания: 13.07.2018 15:31
Текстовые метки: nginx
Раздел: Nginx
Запись: Velonski/mytetra-database/master/base/1481820982fbtxqzikbo/text.html на raw.githubusercontent.com

# nginx configuration


server {

server_name www.shop.supersim24.com;

return 301 http://shop.supersim24.com$request_uri;

}


server {

listen 80;

# listen 443 ssl;

server_name shop.supersim24.com;


client_max_body_size 128M;

charset utf-8;


access_log /var/log/nginx/sotocopy/access.log;

error_log /var/log/nginx/sotocopy/error.log;


root "/var/www/sotocopy-shop/www";

index index.php;


location / {

# try_files $uri $uri/ /index.php?$args;

try_files $uri /index.php?$args;

}


location ~ \.php$ {

try_files $uri =404;


fastcgi_split_path_info ^(.+\.php)(/.+)$;

fastcgi_index index.php;


# Connect to php-fpm via socket

fastcgi_pass unix:/run/php/php7.0-fpm.sock;


fastcgi_connect_timeout 5m; # 30s

fastcgi_read_timeout 5m; # 30s

fastcgi_send_timeout 5m; # 60s

fastcgi_ignore_client_abort on;

fastcgi_pass_header "X-Accel-Expires";


fastcgi_buffer_size 16k;

fastcgi_buffers 256 16k;

fastcgi_max_temp_file_size 0;


fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_param PATH_INFO $fastcgi_path_info;

fastcgi_param HTTP_REFERER $http_referer;

include fastcgi_params;

fastcgi_param SERVER_NAME $host;

# fastcgi_param HTTPS on;

}


location ~* \.(js|css|less|png|jpg|jpeg|gif|ico|woff|ttf|svg|tpl)$ {

expires 24h;

access_log off;

}


location = /favicon.ico {

log_not_found off;

access_log off;

}


location = /robots.txt {

alias "/var/www/sotocopy-shop/www/robots.txt";

log_not_found off;

access_log off;

}


location ~ /\. {

deny all;

access_log off;

log_not_found off;

}

}

Так же в этом разделе:
 
MyTetra Share v.0.59
Яндекс индекс цитирования