nginx examlpe

Пример конфигурационного файла из /etc/nginx/sites-avaible.d

server {
	listen  80;
#	listen  [::1]:80;
	# can't use wildcards in first server_name
	server_name corp.corp.ru;

	location / {
#	    root /var/www/html;

		# autoindex off;
		# autoindex_exact_size on;
		# autoindex_localtime off;

		# expires off;

		# cooperate with mod_realip in apache-1.3 or mod_rpaf in apache-2.x
		#	proxy_redirect off;
			proxy_set_header Host $host;
			proxy_set_header X-Real-IP $remote_addr;
			proxy_set_header X-Forwarded-For $remote_addr;
			proxy_pass http://192.168.10.30:1010;
		#
		# NB: it's better for URI canonicalization that apache sits on :80
		# (even if that's only 127.0.0.1:80)
		#
		# see also set_real_ip_from, real_ip_header if this nginx
		# would need to cooperate with another one acting as a frontend
	}

#        	charset         on;
#        	source_charset  koi8-r;

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