Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name shopscript.local;
- root /var/www/html/shopscript.local/public;
- index index.php;
- try_files $uri $uri/ /index.php?$args;
- location /index.php {
- include snippets/fastcgi-php.conf;
- fastcgi_pass unix:/run/php/php7.0-fpm.sock;
- }
- # for install only
- location /install.php {
- include snippets/fastcgi-php.conf;
- fastcgi_pass unix:/run/php/php7.0-fpm.sock;
- }
- location /api.php {
- fastcgi_split_path_info ^(.+\.php)(.*)$;
- include snippets/fastcgi-php.conf;
- fastcgi_pass unix:/run/php/php7.0-fpm.sock;
- }
- location ^~ /wa-data/protected/ {
- #return 403;
- #X-Accel-Redirect
- internal;
- }
- location ~* ^/wa-(log|config|cache|system)/ {
- return 403;
- }
- location ~* ^/wa-data/public/contacts/photos/[0-9]+/ {
- root /var/www/fw/;
- access_log off;
- expires 30d;
- error_page 404 = @contacts_thumb;
- }
- location @contacts_thumb {
- include snippets/fastcgi-php.conf;
- fastcgi_pass unix:/run/php/php7.0-fpm.sock;
- fastcgi_param SCRIPT_NAME /wa-data/public/contacts/photos/thumb.php;
- fastcgi_param SCRIPT_FILENAME $document_root/wa-data/public/contacts/photos/thumb.php;
- }
- # photos app
- location ~* ^/wa-data/public/photos/[0-9]+/ {
- access_log off;
- expires 30d;
- error_page 404 = @photos_thumb;
- }
- location @photos_thumb {
- include snippets/fastcgi-php.conf;
- fastcgi_pass unix:/run/php/php7.0-fpm.sock;
- fastcgi_param SCRIPT_NAME /wa-data/public/photos/thumb.php;
- fastcgi_param SCRIPT_FILENAME $document_root/wa-data/public/photos/thumb.php;
- }
- # end photos app
- # shop app
- location ~* ^/wa-data/public/shop/products/[0-9]+/ {
- access_log off;
- expires 30d;
- error_page 404 = @shop_thumb;
- }
- location @shop_thumb {
- include snippets/fastcgi-php.conf;
- fastcgi_pass unix:/run/php/php7.0-fpm.sock;
- fastcgi_param SCRIPT_NAME /wa-data/public/shop/products/thumb.php;
- fastcgi_param SCRIPT_FILENAME $document_root/wa-data/public/shop/products/thumb.php;
- }
- # end shop app
- # mailer app
- location ~* ^/wa-data/public/mailer/files/[0-9]+/ {
- access_log off;
- error_page 404 = @mailer_file;
- }
- location @mailer_file {
- include snippets/fastcgi-php.conf;
- fastcgi_pass unix:/run/php/php7.0-fpm.sock;
- fastcgi_param SCRIPT_NAME /wa-data/public/mailer/files/file.php;
- fastcgi_param SCRIPT_FILENAME $document_root/wa-data/public/mailer/files/file.php;
- }
- # end mailer app
- location ~* ^.+\.(jpg|jpeg|gif|png|js|css)$ {
- access_log off;
- expires 30d;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement