Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
strichliste-backend/examples/nginx.conf
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
39 lines (31 sloc)
1.17 KB
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; | |
listen 80; | |
server_name strichliste.yourdomain.tld; | |
root /var/www/strichliste.yourdomain.tld/public; | |
location / { | |
# try to serve file directly, fallback to index.php | |
try_files $uri /index.php$is_args$args; | |
} | |
location ~ ^/index\.php(/|$) { | |
fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
#Avoid sending the security headers twice | |
fastcgi_param modHeadersAvailable true; | |
fastcgi_param front_controller_active true; | |
fastcgi_pass php-handler; | |
fastcgi_intercept_errors on; | |
fastcgi_request_buffering off; | |
# Prevents URIs that include the front controller. This will 404: | |
# http://domain.tld/index.php/some-path | |
# Remove the internal directive to allow URIs like this | |
internal; | |
} | |
# return 404 for all other php files not matching the front controller | |
# this prevents access to other php files you don't want to be accessible. | |
location ~ \.php$ { | |
return 404; | |
} | |
} |