TEXT   66

app conf

Guest on 21st June 2022 09:07:19 AM

  1. server {
  2.    charset utf-8;
  3.    client_max_body_size 128M;
  4.  
  5.    listen 80; ## listen for ipv4
  6.    #listen [::]:80 default_server ipv6only=on; ## listen for ipv6
  7.  
  8.    server_name y2aa-frontend.dev;
  9.    root        /app/frontend/web/;
  10.    index       index.php;
  11.  
  12.    access_log  /app/vagrant/nginx/log/frontend-access.log;
  13.    error_log   /app/vagrant/nginx/log/frontend-error.log;
  14.  
  15.    location / {
  16.        # Redirect everything that isn't a real file to index.php
  17.        try_files $uri $uri/ /index.php?$args;
  18.    }
  19.  
  20.    # uncomment to avoid processing of calls to non-existing static files by Yii
  21.    #location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
  22.    #    try_files $uri =404;
  23.    #}
  24.    #error_page 404 /404.html;
  25.  
  26.    location ~ \.php$ {
  27.        include fastcgi_params;
  28.        fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
  29.        #fastcgi_pass   127.0.0.1:9000;
  30.        fastcgi_pass unix:/var/run/php5-fpm.sock;
  31.        try_files $uri =404;
  32.    }
  33.  
  34.    location ~ /\.(ht|svn|git) {
  35.        deny all;
  36.    }
  37. }
  38.  
  39. server {
  40.    charset utf-8;
  41.    client_max_body_size 128M;
  42.  
  43.    listen 80; ## listen for ipv4
  44.    #listen [::]:80 default_server ipv6only=on; ## listen for ipv6
  45.  
  46.    server_name y2aa-backend.dev;
  47.    root        /app/backend/web/;
  48.    index       index.php;
  49.  
  50.    access_log  /app/vagrant/nginx/log/backend-access.log;
  51.    error_log   /app/vagrant/nginx/log/backend-error.log;
  52.  
  53.    location / {
  54.        # Redirect everything that isn't a real file to index.php
  55.        try_files $uri $uri/ /index.php?$args;
  56.    }
  57.  
  58.    # uncomment to avoid processing of calls to non-existing static files by Yii
  59.    #location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
  60.    #    try_files $uri =404;
  61.    #}
  62.    #error_page 404 /404.html;
  63.  
  64.    location ~ \.php$ {
  65.        include fastcgi_params;
  66.        fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
  67.        #fastcgi_pass   127.0.0.1:9000;
  68.        fastcgi_pass unix:/var/run/php5-fpm.sock;
  69.        try_files $uri =404;
  70.    }
  71.  
  72.    location ~ /\.(ht|svn|git) {
  73.        deny all;
  74.    }
  75. }

Raw Paste


Login or Register to edit or fork this paste. It's free.