Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- root /home/alpas/Projects/PHP/bad_factory/frontend/web;
- index index.php index.html;
- server_name bad.loc;
- charset utf-8;
- location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|pdf|ppt|txt|bmp|rtf|js)$ {
- access_log off;
- expires max;
- }
- location / {
- add_header "Access-Control-Allow-Origin" *;
- try_files $uri /index.php?$args;
- }
- location /lk {
- add_header "Access-Control-Allow-Origin" *;
- proxy_pass http://localhost:4200/;
- ##try_files $uri $uri/ /lk/index.html;
- }
- location /backend {
- try_files $uri /backend/index.php?$args;
- }
- # storage access
- location /storage {
- try_files $uri /storage/index.php?$args;
- }
- client_max_body_size 32m;
- location ~ \.php$ {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_pass unix:/run/php/php7.1-fpm.sock;
- fastcgi_index index.php;
- include fastcgi_params;
- ## Cache
- # fastcgi_pass_header Cookie; # fill cookie valiables, $cookie_phpsessid for exmaple
- # fastcgi_ignore_headers Cache-Control Expires Set-Cookie; # Use it with caution because it is cause SEO problems
- # fastcgi_cache_key "$request_method|$server_addr:$server_port$request_uri|$cookie_phpsessid"; # generating unique key
- # fastcgi_cache fastcgi_cache; # use fastcgi_cache keys_zone
- # fastcgi_cache_path /tmp/nginx/ levels=1:2 keys_zone=fastcgi_cache:16m max_size=256m inactive=1d;
- # fastcgi_temp_path /tmp/nginx/temp 1 2; # temp files folder
- # fastcgi_cache_use_stale updating error timeout invalid_header http_500; # show cached page if error (even if it is outdated)
- # fastcgi_cache_valid 200 404 10s; # cache lifetime for 200 404;
- # or fastcgi_cache_valid any 10s; # use it if you want to cache any responses
- }
- }
- server {
- listen 80;
- root /home/alpas/Projects/PHP/bad_factory/frontend/web;
- index index.php index.html;
- server_name lk.bad.loc;
- charset utf-8;
- location / {
- add_header "Access-Control-Allow-Origin" *;
- proxy_pass http://localhost:4200/;
- }
- client_max_body_size 32m;
- }
Add Comment
Please, Sign In to add comment