TEXT   78

app conf

Guest on 25th May 2022 01:40:43 AM

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

Raw Paste


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