Last active
July 3, 2020 17:17
-
-
Save aman207/913e9b5e330c6bf04ba25e5dfd1d311f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80 default_server; | |
index index.php index.html index.htm | |
server_name _; | |
location /csv { | |
alias /var/www/csv-importer/public/; | |
try_files $uri $uri/ @csv; | |
autoindex on; | |
sendfile off; | |
location ~ \.php$ { | |
include /etc/nginx/fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $request_filename; | |
fastcgi_pass unix:/run/php-fpm.sock; | |
location ~/\.ht { | |
deny all; | |
} | |
} | |
} | |
#https://serversforhackers.com/c/nginx-php-in-subdirectory | |
location @csv { | |
rewrite /csv/(.*)$ /csv/index.php?$query_string last; | |
} | |
location / { | |
root /var/www/firefly-iii/public/; | |
try_files $uri $uri/ /index.php?$query_string; | |
autoindex on; | |
sendfile off; | |
location ~ \.php$ { | |
include /etc/nginx/fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $request_filename; | |
fastcgi_pass unix:/run/php-fpm.sock; | |
location ~/\.ht { | |
deny all; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment