Ticket #1099: default

File default, 3.7 KB (added by progman97@…, 10 years ago)
Line 
1# You may add here your
2# server {
3# ...
4# }
5# statements for each of your virtual hosts to this file
6
7##
8# You should look at the following URL's in order to grasp a solid understanding
9# of Nginx configuration files in order to fully unleash the power of Nginx.
10# http://wiki.nginx.org/Pitfalls
11# http://wiki.nginx.org/QuickStart
12# http://wiki.nginx.org/Configuration
13#
14# Generally, you will want to move this file somewhere, and start with a clean
15# file but keep this around for reference. Or just disable in sites-enabled.
16#
17# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
18##
19
20upstream http_backend {
21 server 127.0.0.1:8888;
22 keepalive 100;
23}
24
25server {
26 listen 80 default_server;
27 listen [::]:80 default_server ipv6only=on;
28 #root /usr/share/nginx/html;
29 # /home/sa/install/www;
30 root /var/www/html;
31 index index.html index.htm ;
32
33 # Make site accessible from http://localhost/
34 server_name localhost;
35
36
37 location /datasets {
38 # keepalive 32;
39 proxy_buffering off;
40 proxy_pass http://127.0.0.1:8888;
41 proxy_read_timeout 300;
42 proxy_connect_timeout 300;
43
44 # Default is HTTP/1, keepalive is only enabled in HTTP/1.1
45 proxy_http_version 1.1;
46
47 # Remove the Connection header if the client sends it,
48 # it could be "close" to close a keepalive connection
49 proxy_set_header Connection "";
50 }
51
52 location / {
53 # First attempt to serve request as file, then
54 # as directory, then fall back to displaying a 404.
55 try_files $uri $uri/ =404;
56 # Uncomment to enable naxsi on this location
57 # include /etc/nginx/naxsi.rules
58
59 }
60
61
62
63
64 # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
65 #location /RequestDenied {
66 # proxy_pass http://127.0.0.1:8080;
67 #}
68
69 #error_page 404 /404.html;
70
71 # redirect server error pages to the static page /50x.html
72 #
73 #error_page 500 502 503 504 /50x.html;
74 #location = /50x.html {
75 # root /usr/share/nginx/html;
76 #}
77
78 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
79 #
80 #location ~ \.php$ {
81 # fastcgi_split_path_info ^(.+\.php)(/.+)$;
82 # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
83 #
84 # # With php5-cgi alone:
85 # fastcgi_pass 127.0.0.1:9000;
86 # # With php5-fpm:
87 # fastcgi_pass unix:/var/run/php5-fpm.sock;
88 # fastcgi_index index.php;
89 # include fastcgi_params;
90 #}
91
92 # deny access to .htaccess files, if Apache's document root
93 # concurs with nginx's one
94 #
95 #location ~ /\.ht {
96 # deny all;
97 #}
98}
99
100
101# another virtual host using mix of IP-, name-, and port-based configuration
102#
103#server {
104# listen 8000;
105# listen somename:8080;
106# server_name somename alias another.alias;
107# root html;
108# index index.html index.htm;
109#
110# location / {
111# try_files $uri $uri/ =404;
112# }
113#}
114
115
116# HTTPS server
117
118server {
119 listen 443;
120 server_name default_server;
121
122 # Make site accessible from http://localhost/
123 server_name localhost;
124
125 root /var/www/html;
126 index index.html index.htm ;
127
128 ssl on;
129 ssl_certificate /etc/letsencrypt/live/infobox.hu/fullchain.pem;
130 ssl_certificate_key /etc/letsencrypt/live/infobox.hu/privkey.pem;
131
132 ssl_session_timeout 5m;
133
134 ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
135 ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
136 ssl_prefer_server_ciphers on;
137
138
139 #proxy_buffering off;
140
141
142 location /datasets {
143 proxy_pass http://127.0.0.1:8888;
144 #proxy_redirect off;
145 #proxy_set_header Host $host;
146 #proxy_set_header X-Real-IP $remote_addr;
147 #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
148 #proxy_set_header X-Forwarded-Proto $scheme;
149 }
150
151 location / {
152 try_files $uri $uri/ =404;
153 }
154
155
156 #location ~ /\. {
157 # deny all;
158 #}
159
160}