45 lines
1.1 KiB
Nginx Configuration File
45 lines
1.1 KiB
Nginx Configuration File
|
user root;
|
||
|
worker_processes auto;
|
||
|
|
||
|
events {
|
||
|
worker_connections 1024;
|
||
|
}
|
||
|
|
||
|
http {
|
||
|
access_log /dev/stdout;
|
||
|
include mime.types;
|
||
|
default_type application/octet-stream;
|
||
|
|
||
|
server {
|
||
|
# we use port 80 here to work with our docker config but you can configure it to any port you want, just remember to update the dockerfile accordingly
|
||
|
listen 80;
|
||
|
|
||
|
index index.php index.html;
|
||
|
|
||
|
# your application here
|
||
|
server_name _;
|
||
|
|
||
|
error_log /var/log/nginx/error.log;
|
||
|
|
||
|
access_log /var/log/nginx/access.log;
|
||
|
|
||
|
# this should be the path of your public folder in laravel which from our dockerfile it would be /var/www/public
|
||
|
root /var/www/public;
|
||
|
|
||
|
location ~ \.php$ {
|
||
|
try_files $uri =404;
|
||
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||
|
fastcgi_pass 127.0.0.1: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 / {
|
||
|
try_files $uri $uri/ /index.php?$query_string;
|
||
|
gzip_static on;
|
||
|
}
|
||
|
}
|
||
|
}
|