Support for Magento2 #204
Replies: 9 comments 3 replies
-
cc @paketo-buildpacks/web-servers |
Beta Was this translation helpful? Give feedback.
-
I have moved the discussion the PHP category as the question deals with the nginx conf generated by the php-nginx buildpack. I tried to quickly run your app but I can't get to your error as the build errored out with Regardless, I don't think you can add server blocks to In case of serving php apps with nginx using paketo buildpacks, you don't really need to define your Your
Let us know if this doesn't help you get moving |
Beta Was this translation helpful? Give feedback.
-
The docs are here (https://paketo.io/docs/reference/php-reference/#php-nginx-buildpackbpphp-nginx-configuration) but it doesn't clearly say where the includes files will go in the main config. I have tried to clarify that in the docs paketo-buildpacks/paketo-website#713 |
Beta Was this translation helpful? Give feedback.
-
@arjun024 How about the upstream, how do i add that
|
Beta Was this translation helpful? Give feedback.
-
If you see the link I sent you earlier of the nginx.conf generated, it already sets the address of a FastCGI server to PHP fpm socket for you. Is there something else you're trying to achieve? |
Beta Was this translation helpful? Give feedback.
-
when i try to run it, i get this error 2023/08/01 10:04:59 [emerg] 26#0: host not found in upstream "php-fpm" in /workspace/nginx.conf.sample:50
process nginx exited, status: exit status 1
error running procs: exit status 1 this is line 50 code location ~* ^/setup($|/) {
root $MAGE_ROOT;
location ~ ^/setup/index.php {
fastcgi_pass php-fpm:9000; # this is line 50
include fastcgi_params;
fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
fastcgi_param PHP_VALUE "memory_limit=756M \n max_execution_time=600";
fastcgi_read_timeout 600s;
fastcgi_connect_timeout 600s;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
} |
Beta Was this translation helpful? Give feedback.
-
I did that, I have a new error 2023/08/01 21:05:56 [emerg] 26#0: no port in upstream "php-fpm" in /workspace/nginx.conf.sample:77
process nginx exited, status: exit status 1
error running procs: exit status 1 # PHP entry point for update application
location ~* ^/update($|/) {
root $MAGE_ROOT;
location ~ ^/update/index.php {
fastcgi_split_path_info ^(/update/index.php)(/.+)$;
fastcgi_pass php-fpm; # this is line 77
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
``` |
Beta Was this translation helpful? Give feedback.
-
@nerdeveloper underscore, not dash ( Imagine you provide the following addition conf in the test app you see here
then if you hit |
Beta Was this translation helpful? Give feedback.
-
OMG! Thank you so much; it works now. @arjun024 I will close this issue |
Beta Was this translation helpful? Give feedback.
-
I have been trying to set up Magento, but I need to figure out what I am doing wrong; it keeps going to 502 bad gateway.
I am trying to replicate this: https://devdocs.magento.com/guides/v2.3/install-gde/prereq/nginx.html
When I try to set up a
.nginx.conf.d/magento-server.conf
I added
I keep getting
my run command is
pack build magento --builder paketobuildpacks/builder:0.2.443-full --path .
My repo is https://github.com/nerdeveloper/magento-sample
Beta Was this translation helpful? Give feedback.
All reactions