server { listen 80; listen [::]:80; #Uncomment the next 4 lines if you are using SSL #listen 443 ssl; #listen [::]:443 ssl; #ssl_certificate /etc/letsencrypt/REPLACEME/fullchain.pem; #ssl_certificate_key /etc/letsencrypt/live/REPLACEME/privkey.pem; #Replace with correct root root /var/www/html/barcodebuddy/; index index.php index.html index.htm; client_max_body_size 20M; client_body_buffer_size 128k; #Replace with your URL server_name your.server.name; location / { try_files $uri $uri/ =404; } location /api/ { try_files $uri /api/index.php$is_args$query_string; } location ~ /example/ { deny all; } location ~ /data/ { deny all; } #Uncomment the next 3 lines if you are using SSL #if ( $scheme = http ) { # return 301 https://$server_name$request_uri; #} #You might need to replace the version with your version location ~ \.php$ { fastcgi_read_timeout 80; include fastcgi_params; #Uncomment if you are using a reverse proxy #fastcgi_pass_header "X-Accel-Buffering"; #Uncomment to use environment variables #eg: fastcgi_param BBUDDY_DISABLE_AUTHENTICATION 'true'; #fastcgi_param BBUDDY_XXXXX 'value'; include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; } location ~ /\.ht { deny all; } }