Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- # leverage browser caching
- #browser caching of static assets
- location ~* \.(jpg|jpeg|png|gif|ico|css|js|ttf)$ {
- expires 7d;
- }
- root /var/www/html/public;
- index index.html index.htm index.php;
- # Make site accessible from http://set-ip-address.xip.io
- server_name fgbmfi.dev;
- access_log /var/log/nginx/web-access.log;
- error_log /var/log/nginx/web-error.log error;
- charset utf-8;
- sendfile off;
- client_max_body_size 100m;
- location / {
- try_files $uri $uri/ /index.html /index.php?$query_string;
- }
- location = /favicon.ico { log_not_found off; access_log off; }
- location = /robots.txt { access_log off; log_not_found off; }
- error_page 404 /index.php;
- # pass the PHP scripts to php5-fpm
- # Note: \.php$ is susceptible to file upload attacks
- # Consider using: "location ~ ^/(index|app|app_dev|config)\.php(/|$) {"
- location ~ \.php$ {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- # With php5-fpm:
- fastcgi_pass app:9000;
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param LARA_ENV local; # Environment variable for Laravel
- fastcgi_param HTTPS off;
- }
- # Deny .htaccess file access
- location ~ /\.ht {
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement