@Vollanddzaft

Настройки Ngnix — кто может помочь настроить?

#user '**********' virtual host '**********.com.ua' configuration file

server {
	server_name **********.com.ua www.**********.com.ua;
	charset UTF-8;
	disable_symlinks if_not_owner from=$root_path;
	gzip on;
	gzip_comp_level 5;
	gzip_disable "msie6";
	gzip_types text/plain text/css;
	index index.html index.php;
	root $root_path;
	set $root_path /var/www/**********/data/www/**********.com.ua;
	access_log off ;
	error_log /var/www/httpd-logs/**********.com.ua.error.log notice;
	include /etc/nginx/vhosts-includes/*.conf;
	
	location / {
			try_files $uri $uri/ /index.php?$args;
		location ~ [^/]\.ph(p\d*|tml)$ {
		    fastcgi_pass   unix:/tmp/php-fcgi.sock;
            fastcgi_index  index.php;
            fastcgi_pass_header Cookie;
            fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
            fastcgi_cache_key "$server_addr:$server_port$request_uri|$cookie_phpsessid";
			try_files /does_not_exists @php;
			access_log        off;
            log_not_found     off;
			expires  360d;
			
		}

	}
	location @php {
		fastcgi_index index.php;
		fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@**********.com.ua";
		fastcgi_pass unix:/var/www/php-fpm/**********.sock;
		fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
		try_files $uri =404;
		include fastcgi_params;

	}
	location @fallback {
		access_log off;
	}
	ssi on;
	listen 95.46.99.152:80;
	expires 1h;
	return 301 https://$host:443$request_uri;
}
server {
	server_name **********.com.ua www.**********.com.ua;
	charset UTF-8;
	disable_symlinks if_not_owner from=$root_path;
	gzip on;
	gzip_comp_level 6;
	gzip_disable "msie6";
	gzip_vary on;
    gzip_proxied any;
    gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript text/x-js;
    gzip_buffers 16 8k;
	index index.html index.php;
	root $root_path;
	set $root_path /var/www/**********/data/www/**********.com.ua;
	access_log off ;
	error_log /var/www/httpd-logs/**********.com.ua.error.log notice;
	include /etc/nginx/vhosts-includes/*.conf;

		
	
	location / {
	        gzip_static on;
			try_files $uri $uri/ /index.php?$args;
			location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
			expires 1h;
			try_files $uri $uri/ @fallback;
		}
	
		
		location ~ [^/]\.ph(p\d*|tml)$ {
		    fastcgi_pass   unix:/tmp/php-fcgi.sock;
            fastcgi_index  index.php;
            fastcgi_pass_header Cookie;
            fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
            fastcgi_cache_key "$server_addr:$server_port$request_uri|$cookie_phpsessid";
			try_files /does_not_exists @php;
			access_log        off;
            log_not_found     off;
			expires  360d;
			
		}

	}
	location @php {
		fastcgi_index index.php;
		fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@**********.com.ua";
		fastcgi_pass unix:/var/www/php-fpm/**********.sock;
		fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
		try_files $uri =404;
		include fastcgi_params;

	}
	location @fallback {
		access_log off ;
		proxy_pass http://127.0.0.1:8080;
		proxy_redirect http://127.0.0.1:8080 /;
		proxy_set_header Host $host;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto $scheme;
		proxy_set_header X-Forwarded-Port $server_port;
	}
	ssi on;
	add_header Strict-Transport-Security "max-age=31536000;";
	listen 95.46.99.152:443;
	ssl on;
	ssl_certificate "/var/www/httpd-cert/**********/**********.com.ua.crtca";
	ssl_certificate_key "/var/www/httpd-cert/**********/**********.com.ua.key";
	ssl_ciphers EECDH:+AES256:-3DES:RSA+AES:!NULL:!RC4;
	ssl_dhparam /etc/ssl/certs/dhparam4096.pem;
	ssl_prefer_server_ciphers on;
	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
}
  • Вопрос задан
  • 60 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы