Dear all,
I reply'd to another topic, but maybe better to start a new one. https://forum.espocrm.com/forum/inst...-save-settings
I've troubles getting EspoCRM installed. We should be able to get it running as it is not on a shared host, but a VPS.
Installation seems to go fine. There are no errors in the systems page. We were able to change php settings and add the one plugin. So far it seems OK.
The Server is a CentOS 7 with DirectAdmin. Php 7.2.17. Server API FPM/FastCGI. Services running including httpd / nginx / php-fpm72.
I put the configuration in "debugging". Still there is no data/log.
Location of CRM is: https://crm.mywebsite.com/
Situation 1:
If I DO NOT add the nginx: "location /api/v1 and location / - try_files $uri $uri/ index.php?$query_string;
" I can get the system working. I can Log IN, I can add stuff (by example a task). But I cannot change anything. Not a task, not any settings in the system page.
In the console/browser I get an error on the file /api/v1/Task/xxxxx
It mentions protocol error on https. It mentions empty string on http.
It gives the same error on PUT and GET, so it cannot be only a PUT error.
So, it might has to do with a bad rewrite.
Situation 2:
If I add
location /api/v1/ {
if (!-e $request_filename){
rewrite ^/api/v1/(.*)$ /api/v1/index.php last; break;
}
}
I get a "Bad server response".
Looking at the console it mentions: dispatch query-2.1.4.min.js:3:6472
And then displays the inside of the index.php: Bad server response: <?php
/************************************************** **********************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshy
etc.etc.etc
Situation 3:
If I comment out the '" if (!-e $request_filename){ ",
then I get a error 500 at /api/v1/Settings.
It does not matter if I change .htaccess inside /api/v1 with or without "RewriteBase /api/v1/"
So I think it goes wrong during the rewrite.
I think that the whole .htaccess is not being read anymore. If I make a mistake inside the file, it does not produce the normal "wrong configuration" error.
Situation 4:
I then add the
location / { try_files $uri $uri/ index.php?$query_string;
Then the error changes to a 404 error /api/v1/Settings
l indeed cannot read: https://crm.mydomain.com/api/v1/index.php resulting in the 404 or 500 error.
I found the nginx.cont at: nano /usr/local/directadmin/data/users/admin/nginx.conf
And the espo files at: cd /home/admin/domains/mydomain.com/public_html/crm/
I tried the chmod 755, these are the results:
-rw-r--r-- 1 admin admin 1449 22 mei 15:20 index.php
drwxr-xr-x 2 admin admin 4096 22 mei 15:20 portal-access
-rw-r--r-- 1 admin admin 367 22 mei 15:20 web.config
Any help is greatly appreciated. As it is unusable at the time and we're looking so much forward start using the system. First starting with contacts... then expanding to agenda - products and invoices. Let's first get the basics right. Thank you all!
I reply'd to another topic, but maybe better to start a new one. https://forum.espocrm.com/forum/inst...-save-settings
I've troubles getting EspoCRM installed. We should be able to get it running as it is not on a shared host, but a VPS.
Installation seems to go fine. There are no errors in the systems page. We were able to change php settings and add the one plugin. So far it seems OK.
The Server is a CentOS 7 with DirectAdmin. Php 7.2.17. Server API FPM/FastCGI. Services running including httpd / nginx / php-fpm72.
I put the configuration in "debugging". Still there is no data/log.
Location of CRM is: https://crm.mywebsite.com/
Situation 1:
If I DO NOT add the nginx: "location /api/v1 and location / - try_files $uri $uri/ index.php?$query_string;
" I can get the system working. I can Log IN, I can add stuff (by example a task). But I cannot change anything. Not a task, not any settings in the system page.
In the console/browser I get an error on the file /api/v1/Task/xxxxx
It mentions protocol error on https. It mentions empty string on http.
It gives the same error on PUT and GET, so it cannot be only a PUT error.
So, it might has to do with a bad rewrite.
Situation 2:
If I add
location /api/v1/ {
if (!-e $request_filename){
rewrite ^/api/v1/(.*)$ /api/v1/index.php last; break;
}
}
I get a "Bad server response".
Looking at the console it mentions: dispatch query-2.1.4.min.js:3:6472
And then displays the inside of the index.php: Bad server response: <?php
/************************************************** **********************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2019 Yuri Kuznetsov, Taras Machyshy
etc.etc.etc
Situation 3:
If I comment out the '" if (!-e $request_filename){ ",
then I get a error 500 at /api/v1/Settings.
It does not matter if I change .htaccess inside /api/v1 with or without "RewriteBase /api/v1/"
So I think it goes wrong during the rewrite.
I think that the whole .htaccess is not being read anymore. If I make a mistake inside the file, it does not produce the normal "wrong configuration" error.
Situation 4:
I then add the
location / { try_files $uri $uri/ index.php?$query_string;
Then the error changes to a 404 error /api/v1/Settings
l indeed cannot read: https://crm.mydomain.com/api/v1/index.php resulting in the 404 or 500 error.
I found the nginx.cont at: nano /usr/local/directadmin/data/users/admin/nginx.conf
And the espo files at: cd /home/admin/domains/mydomain.com/public_html/crm/
I tried the chmod 755, these are the results:
-rw-r--r-- 1 admin admin 1449 22 mei 15:20 index.php
drwxr-xr-x 2 admin admin 4096 22 mei 15:20 portal-access
-rw-r--r-- 1 admin admin 367 22 mei 15:20 web.config
Any help is greatly appreciated. As it is unusable at the time and we're looking so much forward start using the system. First starting with contacts... then expanding to agenda - products and invoices. Let's first get the basics right. Thank you all!
Comment