5
# statements for each of your virtual hosts
5
# statements for each of your virtual hosts to this file
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
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.
17
# Please see /usr/share/doc/nginx/examples/ for more detailed examples.
9
listen 80; ## listen for ipv4
10
listen [::]:80 default ipv6only=on; ## listen for ipv6
12
server_name localhost;
14
access_log /var/log/nginx/localhost.access.log;
21
#listen 80; ## listen for ipv4; this line is default and implied
22
#listen [::]:80 default ipv6only=on; ## listen for ipv6
24
root /usr/share/nginx/www;
25
index index.html index.htm;
27
# Make site accessible from http://localhost/
28
server_name localhost;
18
index index.html index.htm;
31
# First attempt to serve request as file, then
32
# as directory, then fall back to index.html
33
try_files $uri $uri/ /index.html;
33
#error_page 404 /404.html;
48
#error_page 404 /404.html;
35
50
# redirect server error pages to the static page /50x.html
37
#error_page 500 502 503 504 /50x.html;
52
#error_page 500 502 503 504 /50x.html;
38
53
#location = /50x.html {
39
# root /var/www/nginx-default;
54
# root /usr/share/nginx/www;
42
57
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
44
59
#location ~ \.php$ {
45
#proxy_pass http://127.0.0.1;
60
# proxy_pass http://127.0.0.1;
48
63
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
50
65
#location ~ \.php$ {
51
#fastcgi_pass 127.0.0.1:9000;
52
#fastcgi_index index.php;
53
#fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
54
#includefastcgi_params;
66
# fastcgi_pass 127.0.0.1:9000;
67
# fastcgi_index index.php;
68
# include fastcgi_params;
57
71
# deny access to .htaccess files, if Apache's document root
58
72
# concurs with nginx's one
60
74
#location ~ /\.ht {
66
80
# another virtual host using mix of IP-, name-, and port-based configuration
70
#listen somename:8080;
71
#server_name somename alias another.alias;
75
#index index.html index.htm;
84
# listen somename:8080;
85
# server_name somename alias another.alias;
87
# index index.html index.htm;
90
# try_files $uri $uri/ /index.html;
84
#server_name localhost;
87
#ssl_certificate cert.pem;
88
#ssl_certificate_key cert.key;
90
#ssl_session_timeout 5m;
92
#ssl_protocols SSLv3 TLSv1;
93
#ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
94
#ssl_prefer_server_ciphers on;
98
#index index.html index.htm;
99
# server_name localhost;
102
# index index.html index.htm;
105
# ssl_certificate cert.pem;
106
# ssl_certificate_key cert.key;
108
# ssl_session_timeout 5m;
110
# ssl_protocols SSLv3 TLSv1;
111
# ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
112
# ssl_prefer_server_ciphers on;
115
# try_files $uri $uri/ /index.html;