Category : nginx

I’m trying to run code after the page has finished loading while pushing content as it’s ready. Here’s my current script: <?php ob_implicit_flush(1); ob_end_clean(); ob_start(); ignore_user_abort(1); echo ‘Hello’; // User will see this ob_flush(); flush(); echo ‘World’; // User won’t see this The goal is for something like this: <?php echo ‘1’; // Send to ..

Read more

I have a Nginx server running PHP-FPM using a Laravel application. On one of the API endpoints I have a rather large response, and get the following error: FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /path/to/project/vendor/laravel/framework/src/Illuminate/Http/JsonResponse.php on line 65 PHP ..

Read more

I have a working Nextcloud web server set up with Nginx. My plan is to make a server block and host a very small Magento 2 Ecommerce. I would like to host both web servers on the same pc. I already installed magento 2 and all the components following this tutorial here : https://www.rosehosting.com/blog/how-to-install-magento-2-4-3-on-ubuntu-20-04/ My ..

Read more

I have big problem with nginx on the Ubuntu 18.04. I tested the setting that if there is no subdir, the user will be redirected to a php file, for example in /system/error.php. The problem is that I used the URL tutorial and modified it location ~ /.ht { deny all; } to location = ..

Read more

I’m using Laravel sanctum to authenticate my API, but i’m not using the default laravel User model, I’ve built a model to separate my App customers in another table called Customer. To this to work I did the alterations bellow Custom model Customer.php <?php namespace AppModels; use IlluminateDatabaseEloquentFactoriesHasFactory; use IlluminateDatabaseEloquentModel; use IlluminateFoundationAuthUser as Authenticatable; use ..

Read more

I have three types of url like this : http://log.cb.gq/index.php/creative-thinking-workshop-de http://log.cb.gq/work.php/creative-thinking-workshop-de http://log.cb.gq/cat.php/creative-thinking-workshop-de and nginx conf is like this location / { try_files $uri $uri/ /index.php$is_args$args; #rewrite ^/([a-zA-Z0-9]+)/?$ /index.php?$1; } and only first url ie index.php work. How can I make all three work Sourc..

Read more