Closed nobicycle closed 9 years ago
I never tested with nginx, can you check if this configuraton helps:
http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html#nginx
Given the above documentation, I think you would also need to adjust the dev rule:
# DEV
# This rule should only be placed on your development environment
# In production, don't include this and don't deploy app_dev.php or config.php
location ~ ^/(app_dev|config|setup)\.php(/|$) {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
# When you are using symlinks to link the document root to the
# current version of your application, you should pass the real
# application path instead of the path to the symlink to PHP
# FPM.
# Otherwise, PHP's OPcache may not properly detect changes to
# your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
# for more information).
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
}
Thanks. I added that nginx location, slightly changed: location ~ ^/partkeepr/(web|app)/.php(/|$) {* and got through to almost the last stage: Symphony then complained with "The parameter "partkeepr.category.path_separator" must be defined. " The full errors are in the file below: symphony-error.txt
I just added a fix, can you try again?
Yes, that's good. Setup completed. Though initially I got a 504 Gateway Time-out. But after clearing nginx log (to capture only the relevant lines), when I ran Partkeepr install again it worked. So I assume the error was just a temporary network glitch.
Best wishes
I'm reopening this to implement a setup check to verify that both mod_rewrite on apache and proper config on nginx is configured.
One small/large :-) issue is that when I click submit on the Setup Compete tab of the installer, it does not forward to Partkeepr app, but returns to the installer Welcome screen. No errors displayed. No errors in Nginx log. I suppose the rewrite rules need adjusting . What is the url that Submit should forward to?
Can you open a new issue for that?
OK
Just did a fresh install. "Symphony2 Requirements " stage passed OK. But next the "Webserver misconfiguration" error returned Exactly the same configuration for nginx as above (where install finished OK) was in use.
_location ~ ^/partkeepr/(web|app)/.php(/|$) { fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; fastcgi_split_pathinfo ^(.+.php)(/.)$; include /etc/nginx/fastcgi.conf; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; fastcgi_param DOCUMENT_ROOT $realpath_root; }*
The nginx error : 2015/11/17 17:53:56 [error] 517#0: *104 open() "/srv/http/partkeepr/web/setup.php/setup/webserverTest" failed (20: Not a directory), client: 127.0.0.1, server: localhost, request: "POST /partkeepr/web/setup.php/setup/webserverTest HTTP/1.1", host: "localhost", referrer: "http://localhost/partkeepr/web/setup/"
Regards
You can click on the "read more" link in the error details, then you get a page where the NGINX settings are shown: https://wiki.partkeepr.org/wiki/KB00005:Web_Server_Configuration
Hello Timo Glad to see you back at the wheel. Using a git clone (dated today), at this stage:
I get generateAuthKey failed in the webserver log.
2015/11/15 19:07:57 [error] 558#558: *31 open() "/srv/http/partkeepr/web/setup.php/setup/generateAuthKey" failed (20: Not a directory), client: 127.0.0.1, server: localhost, request: "POST /partkeepr/web/setup.php/setup/generateAuthKey HTTP/1.1", host: "localhost", referrer: "http://localhost/partkeepr/web/setup/"
Nginx is vanilla config; nginx.txt
PHP is $ php -v PHP 5.6.15 (cli) (built: Oct 29 2015 14:57:34) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
composer was updated. $composer show --installed|grep 'doctrine/orm' *doctrine/orm v2.5.1 Object-Relational-Mapper for PHP"
Best wishes