Hello, I have problem with webservice (API) of PrestaShop. I'm Looking for the reason beacuse previously on shared hosting everything was working. When I'm trying to connect to webservice (API), I'm getting error 401. I have checked logs and i can see:
access_log:
domain.com.log
Also, I have checked Symfony Profiler in PrestaShop. I saw Server Parameters and there is:
I think there should be public_html instead of private_html, so I checked httpd.conf file and in <VirtualHost IP:443 > section there was private_html in DocumentRoot so I did this for cutomization:
and httpd.conf has been changed in <VirtualHost IP:443 > section from private_html to public_html. So I have checked Symfony Profiler in PrestaShop and Server Parameters still said:
I'm using Apache + PHP-FPM (PHP 7.0). I'm out of ideas what to do next because i thought it could be a apache+nginx fault, but I have a fresh install now and the same problem.
EDIT: Now Symfony Profiler in PrestaShop shows public_html but still have error 401.
EDIT2: For a test, I have installed VestaCP to test if problem with connection to API will still remains, but it's not. APi working without any error. Where could be a problem with config of DirectAdmin? Or Apache?
access_log:
Code:
IP - - [15/Feb/2020:10:22:05 +0000] "-" 408 3785 "-" "-"
domain.com.log
Code:
IP - - [15/Feb/2020:12:20:38 +0000] "GET /api/ HTTP/1.0" 301 475 "-" "-"
IP - - [15/Feb/2020:12:20:38 +0000] "GET /api/ HTTP/1.0" 401 4608 "-" "-"
Also, I have checked Symfony Profiler in PrestaShop. I saw Server Parameters and there is:
Code:
CONTEXT_DOCUMENT_ROOT "/home/admin/domains/domain.com/private_html"
DOCUMENT_ROOT "/home/admin/domains/domain.com/private_html"
Code:
|?DOCROOT=/home/admin/domains/domain.com/public_html|
Code:
CONTEXT_DOCUMENT_ROOT "/home/admin/domains/domain.com/private_html"
DOCUMENT_ROOT "/home/admin/domains/domain.com/private_html"
I'm using Apache + PHP-FPM (PHP 7.0). I'm out of ideas what to do next because i thought it could be a apache+nginx fault, but I have a fresh install now and the same problem.
EDIT: Now Symfony Profiler in PrestaShop shows public_html but still have error 401.
EDIT2: For a test, I have installed VestaCP to test if problem with connection to API will still remains, but it's not. APi working without any error. Where could be a problem with config of DirectAdmin? Or Apache?
Last edited: