|
| 1 | +## |
| 2 | +# You should look at the following URL's in order to grasp a solid understanding |
| 3 | +# of Nginx configuration files in order to fully unleash the power of Nginx. |
| 4 | +# http://wiki.nginx.org/Pitfalls |
| 5 | +# http://wiki.nginx.org/QuickStart |
| 6 | +# http://wiki.nginx.org/Configuration |
| 7 | +# |
| 8 | +# Generally, you will want to move this file somewhere, and start with a clean |
| 9 | +# file but keep this around for reference. Or just disable in sites-enabled. |
| 10 | +# |
| 11 | +# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. |
| 12 | +## |
| 13 | + |
| 14 | +# Default server configuration |
| 15 | +# |
| 16 | +server { |
| 17 | + listen 80 default_server; |
| 18 | + listen [::]:80 default_server; |
| 19 | + |
| 20 | + # SSL configuration |
| 21 | + # |
| 22 | + # listen 443 ssl default_server; |
| 23 | + # listen [::]:443 ssl default_server; |
| 24 | + # |
| 25 | + # Self signed certs generated by the ssl-cert package |
| 26 | + # Don't use them in a production server! |
| 27 | + # |
| 28 | + # include snippets/snakeoil.conf; |
| 29 | + |
| 30 | + root /var/www/html; |
| 31 | + |
| 32 | + # Add index.php to the list if you are using PHP |
| 33 | + index index.html index.htm index.nginx-debian.html; |
| 34 | + |
| 35 | + server_name _; |
| 36 | + |
| 37 | + location / { |
| 38 | + # First attempt to serve request as file, then |
| 39 | + # as directory, then fall back to displaying a 404. |
| 40 | + try_files $uri $uri/ =404; |
| 41 | + } |
| 42 | + |
| 43 | + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 |
| 44 | + # |
| 45 | + #location ~ \.php$ { |
| 46 | + # include snippets/fastcgi-php.conf; |
| 47 | + # |
| 48 | + # # With php5-cgi alone: |
| 49 | + # fastcgi_pass 127.0.0.1:9000; |
| 50 | + # # With php5-fpm: |
| 51 | + # fastcgi_pass unix:/var/run/php5-fpm.sock; |
| 52 | + #} |
| 53 | + |
| 54 | + # deny access to .htaccess files, if Apache's document root |
| 55 | + # concurs with nginx's one |
| 56 | + # |
| 57 | + #location ~ /\.ht { |
| 58 | + # deny all; |
| 59 | + #} |
| 60 | +} |
| 61 | + |
| 62 | + |
| 63 | +# Virtual Host configuration for example.com |
| 64 | +# |
| 65 | +# You can move that to a different file under sites-available/ and symlink that |
| 66 | +# to sites-enabled/ to enable it. |
| 67 | +# |
| 68 | +#server { |
| 69 | +# listen 80; |
| 70 | +# listen [::]:80; |
| 71 | +# |
| 72 | +# server_name example.com; |
| 73 | +# |
| 74 | +# root /var/www/example.com; |
| 75 | +# index index.html; |
| 76 | +# |
| 77 | +# location / { |
| 78 | +# try_files $uri $uri/ =404; |
| 79 | +# } |
| 80 | +#} |
0 commit comments