Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- location / {
- # URLs to attempt, including pretty ones
- try_files $uri $uri/ /index.php?$query_string;
- }
- location /api/ {
- # URLs to attempt, including pretty ones
- try_files $uri $uri/ /api/index.php?$query_string;
- }
- # PHP FPM configuration.
- location ~* \.php$ {
- fastcgi_pass unix:/run/php/php7.2-fpm.sock;
- fastcgi_index index.php;
- fastcgi_split_path_info ^(.+\.php)(.*)$;
- include fcgi.conf;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
- # We don't need .ht files with nginx.
- location ~ /\.ht {
- deny all;
- }
- # Hide dot files/folders
- location ~ .*/\. {
- return 403;
- }
- error_page 403 /403.html;
- # Set header expirations on per-project basis
- location ~* \.(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {
- expires 365d;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement