Skip to content

Instantly share code, notes, and snippets.

@Erulezz
Last active April 25, 2020 12:08
Show Gist options
  • Save Erulezz/477d35bf30024f2c6bd4708bf78ddda7 to your computer and use it in GitHub Desktop.
Save Erulezz/477d35bf30024f2c6bd4708bf78ddda7 to your computer and use it in GitHub Desktop.
##########################################
# Rewrites for Firefly + CSV-Importer.
# First location is for CSV Import tool
# General / is for the app
##########################################
location /csv-importer {
alias /full/path/to/csv/importer/public;
try_files $uri $uri/ @csv_importer;
location ~* \.php {
fastcgi_split_path_info ^(.+?\.php)(/.*)?$;
fastcgi_pass unix:/usr/local/php|PHP1_RELEASE|/sockets/|USER|.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include /etc/nginx/fastcgi_params;
}
}
location @csv_importer {
rewrite ^/csv-importer/(.*)$ /csv-importer/index.php/$1 last;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment