-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
42bb94a
commit 1a06629
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
server { | ||
# Render provisions and terminates SSL | ||
listen 80; | ||
|
||
# Make site accessible from http://localhost/ | ||
server_name _; | ||
|
||
root /var/www/html/public; | ||
index index.html index.htm index.php; | ||
|
||
# Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html | ||
sendfile off; | ||
|
||
# Add stdout logging | ||
error_log /dev/stdout info; | ||
access_log /dev/stdout; | ||
|
||
# block access to sensitive information about git | ||
location /.git { | ||
deny all; | ||
return 403; | ||
} | ||
|
||
add_header X-Frame-Options "SAMEORIGIN"; | ||
add_header X-XSS-Protection "1; mode=block"; | ||
add_header X-Content-Type-Options "nosniff"; | ||
|
||
charset utf-8; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.php?$query_string; | ||
} | ||
|
||
location = /favicon.ico { access_log off; log_not_found off; } | ||
location = /robots.txt { access_log off; log_not_found off; } | ||
|
||
error_page 404 /index.php; | ||
|
||
location ~* \.(jpg|jpeg|gif|png|css|js|ico|webp|tiff|ttf|svg)$ { | ||
expires 5d; | ||
} | ||
|
||
location ~ \.php$ { | ||
fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
fastcgi_pass unix:/var/run/php-fpm.sock; | ||
fastcgi_index index.php; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_param SCRIPT_NAME $fastcgi_script_name; | ||
include fastcgi_params; | ||
} | ||
|
||
# deny access to . files | ||
location ~ /\. { | ||
log_not_found off; | ||
deny all; | ||
} | ||
|
||
location ~ /\.(?!well-known).* { | ||
deny all; | ||
} | ||
} |