Last active
February 4, 2021 17:20
-
-
Save tarlepp/cef35a2f8fbe681be88d4b77e255ad6a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 { | |
server_name app.localhost; | |
root /app/public; | |
location / { | |
# try to serve file directly, fallback to index.php | |
try_files $uri @rewriteapp; | |
} | |
location @rewriteapp { | |
rewrite ^(.*)$ /index.php/$1 last; | |
} | |
location ~* \.php(/|$) { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
fastcgi_pass php-upstream; | |
fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param HTTPS off; | |
} | |
gzip on; | |
gzip_disable "msie6"; | |
gzip_vary on; | |
gzip_proxied any; | |
gzip_comp_level 6; | |
gzip_buffers 16 8k; | |
gzip_http_version 1.1; | |
gzip_min_length 256; | |
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon; | |
gzip_static on; | |
server_tokens off; | |
disable_symlinks off; | |
fastcgi_buffer_size 256k; | |
fastcgi_buffers 4 512k; | |
fastcgi_busy_buffers_size 512k; | |
error_log /var/log/nginx/app_error.log; | |
access_log /var/log/nginx/app_access.log; | |
} |
This file contains hidden or 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
upstream php-upstream { | |
server php:9000; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment