Guest User

Untitled

a guest
Feb 22nd, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.30 KB | None | 0 0
  1. Itt az nginx config:
  2.  
  3. user              nginx  nginx;
  4.  
  5. worker_processes  4;
  6.  
  7. pid        /var/run/nginx.pid;
  8.  
  9. worker_rlimit_nofile 1024;
  10.  
  11. events {
  12.         worker_connections 2048;
  13.         use epoll;
  14.         multi_accept on;
  15. }
  16.  
  17.  
  18. http {
  19.  
  20.        include /etc/nginx/mime.types;
  21.         default_type application/octet-stream;
  22.         sendfile on;
  23.         tcp_nopush on;
  24.         tcp_nodelay on;
  25.         access_log "/var/log/nginx/access.log";
  26.         error_log "/var/log/nginx/error.log";
  27.         keepalive_timeout 120;
  28.  
  29.         include /etc/nginx/conf.d/*.conf;
  30.         include /etc/nginx/sites-enabled/*;
  31. }
  32. deault.conf:
  33.  
  34. server {
  35.    listen *:80;
  36.    server_name vagrant.ceg.com;
  37.    return 301 'https://$server_name$request_uri';
  38. }
  39.  
  40. https.conf:
  41.  
  42. server {
  43.    listen *:443;
  44.    ssl on;
  45.    ssl_certificate ....crt;
  46.    ssl_certificate_key ....key;
  47.    server_name vagrant.ceg.com www.vagrant.ceg.com;
  48.    root "/srv/www";
  49.    index index.php;
  50.    location / {
  51.        autoindex on;
  52.  
  53.    }
  54.    location ~ \.php$ {
  55.        include /etc/nginx/fastcgi_params;
  56.        fastcgi_param ENVIRONMENT dev;
  57.        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  58.        fastcgi_index index.php;
  59.        if (-f $request_filename) {
  60.        fastcgi_pass 192.168.42.114:9000;
  61.    }
  62.  
  63.    }
  64. }
Advertisement
Add Comment
Please, Sign In to add comment