Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 2.30 KB | None | 0 0
  1. ##nginx.conf
  2. user www-data;
  3. worker_processes auto;
  4. pid /run/nginx.pid;
  5.  
  6. events {
  7.     worker_connections      42; #65536;
  8.     multi_accept            on;
  9. }
  10.  
  11. http {
  12.     ##
  13.     # Basic Settings
  14.     ##
  15.     #charset                utf-8;
  16.     sendfile            on;
  17.     tcp_nopush          on;
  18.     tcp_nodelay             on;
  19.     keepalive_timeout       65;
  20.     types_hash_max_size     2048;
  21.     # server_tokens off;
  22.  
  23.     #Enable open file cache
  24.     #open_file_cache            max=1000 inactive=20s;
  25.     #open_file_cache_valid      30s;
  26.     #open_file_cache_min_uses   2;
  27.     #open_file_cache_errors     on;
  28.  
  29.     #keepalive_timeout      300;
  30.     #send_timeout           10;
  31.  
  32.     include /etc/nginx/mime.types;
  33.     default_type application/octet-stream;
  34.  
  35.     ##
  36.     # SSL Settings
  37.     ##
  38.     ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
  39.     ssl_prefer_server_ciphers on;
  40.  
  41.     ##
  42.     # Logging Settings
  43.     ##
  44.     access_log /var/log/nginx/access.log;
  45.     error_log /var/log/nginx/error.log;
  46.  
  47.     ##
  48.     # Gzip Settings
  49.     ##
  50.     gzip on;
  51.     gzip_disable "msie6";
  52.  
  53.     ##
  54.     # Virtual Host Configs
  55.     ##
  56.     include /etc/nginx/conf.d/*.conf;
  57.     include /etc/nginx/sites-enabled/*;
  58. }
  59.  
  60.  
  61. ##site-enable >> worpress
  62. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  63.  
  64. server {
  65.     listen 80 default_server;
  66.     listen [::]:80 default_server;
  67.     server_name www.gfelot.xyz
  68.  
  69.     access_log /var/log/nginx/gfelot.xyz.access.log;;
  70.     error_log /var/log/nginx/gfelot.xyz.log;
  71.     #
  72.     # Self signed certs generated by the ssl-cert package
  73.     # Don't use them in a production server!
  74.     #
  75.     # include snippets/snakeoil.conf;
  76.  
  77.     root /var/www/html;
  78.  
  79.     # Add index.php to the list if you are using PHP
  80.     index index.php index.html index.htm index.nginx-debian.html;
  81.  
  82.     server_name 5.135.177.59;
  83.  
  84.     location / {
  85.           try_files $uri $uri/ /index.php?q=$uri&$args;
  86.         }
  87.  
  88.     error_page 404 /404.html;
  89.     error_page 500 502 503 504 /50x.html;
  90.     location = /50x.html {
  91.          root /usr/share/nginx/html;
  92.     }
  93.  
  94.     #location ~* \.css$ {
  95.     #    acces_log off;
  96.     #    expires 1M;
  97.     #    add_header Pragma public;
  98.     #    add_header Cache-Control public;
  99.     #    add_header Vary Accept-Encoding;
  100.     #}
  101.  
  102.     # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  103.     ocation ~ \.php$ {
  104.          try_files $uri =404;
  105.          fastcgi_pass unix:/var/run/php5-fpm.sock;
  106.          fastcgi_index index.php;
  107.          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  108.          include fastcgi_params;
  109.  
  110.         }
  111. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement