Skip to content

Instantly share code, notes, and snippets.

@shawnhooper
Created December 19, 2019 02:38
Show Gist options
  • Save shawnhooper/29d98e869746b1a1141bd657a7cf2466 to your computer and use it in GitHub Desktop.
Save shawnhooper/29d98e869746b1a1141bd657a7cf2466 to your computer and use it in GitHub Desktop.
NGINX Config
server {
root /var/www/public;
listen 80;
location / {
index index.php;
try_files $uri $uri/ /index.php?$args;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass app:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location /vendor {
index index.php;
try_files $uri $uri/ /vendor/index.php$is_args$args;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass app:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location /client {
index index.php;
try_files $uri $uri/ /client/index.php$is_args$args;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass app:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment