Advertisement
Guest User

Untitled

a guest
Aug 9th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.85 KB | None | 0 0
  1. listen 80;
  2.     listen 443 ssl http2;
  3.     server_name ismlar.test;
  4.     root "/home/vagrant/Code/ismlar/public";
  5.  
  6.     index index.html index.htm index.php;
  7.  
  8.     charset utf-8;
  9.  
  10.     location / {
  11.         try_files $uri $uri/ /index.php?$query_string;
  12.     }
  13.  
  14.     location /blog {
  15.         alias "/home/vagrant/Code/ismlar_blog/public";
  16.         index index.php;
  17.  
  18.         try_files $uri $uri/ /blog/index.php?$args;
  19.         #if (!-e $request_filename) { rewrite ^ /blog/index.php last; }
  20.  
  21.         location ~ \.php$ {
  22.             if (!-f $request_filename) { return 404; }
  23.             #fastcgi_pass 127.0.0.1:9000;
  24.             fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
  25.             include fastcgi_params;
  26.             fastcgi_param SCRIPT_FILENAME $request_filename;
  27.             fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  28.         }
  29.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement