parser

Написать ответ на текущее сообщение

 

 
   команды управления поиском

Ответ

Sanja v.2 17.09.2020 19:25 / 17.09.2020 21:59

тогда уже до кучи, "чтоб не забыть", настройки /etc/nginx/conf.d/example.com.conf:
##############################################
# example.com
##############################################

server {
	listen 443      ssl;
	listen [::]:443 ssl;
	ssl_certificate       /etc/letsencrypt/live/example.com/fullchain.pem; 
	ssl_certificate_key   /etc/letsencrypt/live/example.com/privkey.pem; 
	include               /etc/letsencrypt/options-ssl-nginx.conf; 
	server_name           example.com;
	root                  /var/www/example.com/html;
	index                 index.html index.htm index.parser;
	location / {
		try_files $uri $uri/ =404;
	}
	location ~ \.parser$ {
		try_files      $uri     =404;
		fastcgi_pass   unix:/var/run/fcgiwrap.socket;
		fastcgi_param  SCRIPT_NAME  $request_uri;
		fastcgi_param  SCRIPT_FILENAME  /var/www/example.com/cgi/parser3.cgi;
		fastcgi_param  PATH_INFO    $fastcgi_script_name;
		fastcgi_param  PATH_TRANSLATED  /var/www/example.com/html$fastcgi_script_name;
		include /etc/nginx/fastcgi_params;
	}
	location ~ \.(p|cfg|dir|pag)$ {
		return 404;
	}
}

##############################################
# www.example.com, no SSL
##############################################

server {
	listen 80;
	listen [::]:80;
	return 301 https://example.com$request_uri;
	server_name example.com www.example.com;
}

server {
	listen 443 ssl; 
	ssl_certificate     /etc/letsencrypt/live/www.example.com/fullchain.pem; 
	ssl_certificate_key /etc/letsencrypt/live/www.example.com/privkey.pem; 
	include             /etc/letsencrypt/options-ssl-nginx.conf; 
	server_name         www.example.com;
	return 302          https://example.com$request_uri;
}