Advertisement
aitormendez

Nginx server block

Nov 17th, 2015
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.04 KB | None | 0 0
  1. server {
  2.     listen 80;
  3.  
  4.     server_name  iac.e451.net;
  5.     access_log   /srv/www/iac.e451.net/logs/access.log;
  6.     error_log    /srv/www/iac.e451.net/logs/error.log;
  7.     root /srv/www/iac.e451.net;
  8.  
  9.     # Add index.php to the list if you are using PHP
  10.     index index.html index.htm;
  11.  
  12.     charset utf-8;
  13.  
  14.     location / {
  15.         # First attempt to serve request as file, then
  16.         # as directory, then fall back to displaying a 404.
  17.         try_files $uri $uri/ =404;
  18.         autoindex on;
  19.     }
  20.  
  21.     # deny access to .htaccess files, if Apache's document root
  22.     # concurs with nginx's one
  23.     #
  24.     #location ~ /\.ht {
  25.     #   deny all;
  26.     #}
  27. }
  28.  
  29. # Virtual Host configuration for example.com
  30. #
  31. # You can move that to a different file under sites-available/ and symlink that
  32. # to sites-enabled/ to enable it.
  33. #
  34. #server {
  35. #   listen 80;
  36. #   listen [::]:80;
  37. #
  38. #   server_name example.com;
  39. #
  40. #   root /var/www/example.com;
  41. #   index index.html;
  42. #
  43. #   location / {
  44. #       try_files $uri $uri/ =404;
  45. #   }
  46. #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement