I’m running Ubuntu 18.04 with nginx/1.14.0. I have been running PHP 7.2 but some of my web applications require a newer php for security reasons. Since it is nginx, I use PHP-FPM. I used apt to …
Tag: nginx
How to serve two laravel apps on 1 domain?
I have two laravel apps like this: I’m trying to serve them on linux machine, I can’t seem to get them to work together. I want to have two urls like this: https://test.example.co https://test.example.co/dashboard Answer I succeeded serving them using another subdomain, the “/dashboard” idea didn’t work. I hope someone can suggest the correct way to do it, I would
Why am I able to run PHP sudo commands?
I have a PHP script that does the following: $output = exec(‘sudo nginx -t 2>&1’); echo $output; As expected, it returns the following due to using a sudo command: sudo: no tty present and no …
NGINX/PHP cant access files outside root directory
I just installed nginx and php72 on openbsd server to setup an website. I have my website root directory in /var/www/html and want to access some XML files that I store in /var/cache/. The problem is …
nginx server with dynamic index is not executing php
i tried setting up my php backend and my vue on the same location. Based on the X-Requested-With header the server should decide if the backend would be used or the vue should be delivered. Now the delivery of the vue file is working, but the php is not executed. info: at the position of X-URI the $uri is /index.php,
The post body is automatically printed when requesting a POST on nginx [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last year. Improve this question I use nginx and php. When I click the button on the above code, x=D was printed on my browser. (As you know, it is normal
Docker – Nginx, PHP, MySQL – Laravel artisan migrate connection refused
I have Laravel running in Docker with 3 containers – Nginx, MySQL 8 And PHP 8. I have the following docker-compose.yaml This command: Launches 3 containers: I want to run php artisan migrate, so I try it like so: This gives me the following error: My mysql.env file is like so: AND .env: I’ve tried changing ports, host, but I
nginx return 200 but empty reponse
I am currently migrating apache to nginx and I am struggling to get it working. Basically I get a 200 response with no content. My nginx configuration is as below: server { listen [::]:8749 …
php-fpm: File not found in kubernetes
I’m trying to set a k8s deployment with 2 pods (nginx + php-fpm), but I can’t get php-fpm to execute the php scripts. The webpage displays File not found., and in logs : fpm pod : 192.168.3.187 – 13/Nov/2020:16:44:06 +0000 “GET /index.php” 404 nginx pod : 2020/11/13 16:44:06 [error] 20#20: *1 FastCGI sent in stderr: “Primary script unknown” while reading
Remove the .php extension on all pages (NGINX)
Having tried all the solutions on Stack, I was not able to remove the .php extension. I managed to make the URLs accessible: www.mydomain.com/login but the user can always change the URL to www.mydomain.com/login.php and I’d like to avoid that. Here is a part of my config : Answer This might be what you’re looking for For .html extensions you