Welcome! Log In Create A New Profile

Advanced

RE: nginx, php7.0-fpm and laravel, not able to set it up when the url has a prefix which the server doesn't have

Reinis Rozitis
August 07, 2018 07:30AM
> Hello,
> Thanks for that input, I changed my config like you said and also set the fastcgi_param SCRIPT_FILENAME to /path/to/the/index.php;

> But I feel like this should be done by the rewrite directive instead of this way. Now that this is working, can someone please tell me if I can use the rewrite tag so that I can avoid
> hardcoding the path everywhere?


Well you didn't specify the actual rewrite.

Also from the initial mail the actual setup is a bit unclear - if the docker is only running php-fpm (and the nginx is on host) or both nginx and php are inside docker, but I assume it's the first.

As an idea - while you can mangle/rewrite the root/path in the nginx config, when configuring wordpress (+php-fpm) to run inside a docker container I found more easy just to set the container volume to have the same path (mount point) as the host server. So while isolated, both (nginx on host and php inside container) have identical directory tree.

rr

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx, php7.0-fpm and laravel, not able to set it up when the url has a prefix which the server doesn't have

Plato Puthur August 05, 2018 04:06PM

RE: nginx, php7.0-fpm and laravel, not able to set it up when the url has a prefix which the server doesn't have

Reinis Rozitis August 06, 2018 04:04AM

Re: nginx, php7.0-fpm and laravel, not able to set it up when the url has a prefix which the server doesn't have

Plato Puthur August 06, 2018 11:32AM

RE: nginx, php7.0-fpm and laravel, not able to set it up when the url has a prefix which the server doesn't have

Reinis Rozitis August 07, 2018 07:30AM

Re: nginx, php7.0-fpm and laravel, not able to set it up when the url has a prefix which the server doesn't have

Plato Puthur August 08, 2018 04:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 249
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready