OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums Forums OroCommerce OroCommerce 4.0 – 401 error – infinit loop reload

This topic contains 4 replies, has 2 voices, and was last updated by  nmella1 11 months, 1 week ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
  • #40353


    Hi guys,

    I am testing OroCommerce 4.0. I followed this guide, and I can access the frontend but I can’t login to the backend.

    After success login to the backend, I have an infinite reload loop, so I can’t do anything. It is similar to this post:


    When checking the browser console, I get 403 and 401 error on this files:

    https://www.mercadob2b.cl/admin/sync/ticket (403)
    https://www.mercadob2b.cl/admin/api/rest/latest/navigationitems/pinbar (401)

    Supervisor seems to be OK:

    Nginx proxy configuratoin is:

    server {
    listen 80;
    server_name http://www.mercadob2b.cl;
    return 301 https://www.mercadob2b.cl$request_uri;

    server {
    listen 443 ssl;
    server_name http://www.mercadob2b.cl;
    error_log /var/log/nginx/www.mercadob2b.cl-error.log error;
    #access_log /var/log/nginx/www.mercadob2b.cl-access.log;

    ssl on;
    ssl_certificate /etc/letsencrypt/live/www.mercadob2b.cl/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/www.mercadob2b.cl/privkey.pem;
    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_dhparam /etc/nginx/ssl/dhparams.pem;

    location / {
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_pass_header X-CSRFToken;
    proxy_connect_timeout 600;
    proxy_read_timeout 600;
    proxy_send_timeout 600;
    client_max_body_size 1024M; # Set higher depending on your needs

    Nginx internal server configuration is:

    server {
    listen 80;
    server_name http://www.mercadob2b.cl;

    root /usr/share/nginx/html/oroapp4/public;

    error_log /var/log/nginx/mercadob2b.cl_http_error.log;
    access_log /var/log/nginx/mercadob2b.cl_http_access.log;

    index index.php;

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;

    # Increase this value in file uploads is allowed for larger files
    client_max_body_size 8m;

    gzip on;
    gzip_proxied any;
    gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
    gzip_vary on;

    try_files $uri $uri/ @rewrite;

    location @rewrite {
    rewrite ^/(.*)$ /index.php/$1;

    #location / {
    # try_files $uri /index.php$is_args$args;

    location ~ /\.ht {
    deny all;

    location ~* ^[^(\.php)]+\.(jpg|jpeg|gif|png|ico|css|txt|bmp|js)$ {
    add_header Cache-Control public;
    expires 1h;
    access_log off;

    location ~ [^/]\.php(/|$) {
    fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    if (!-f $document_root$fastcgi_script_name) {
    return 404;
    include fastcgi_params;
    fastcgi_index index.php;
    fastcgi_intercept_errors on;
    fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;
    fastcgi_buffer_size 128k;
    fastcgi_buffers 4 256k;
    fastcgi_busy_buffers_size 256k;
    fastcgi_temp_file_write_size 256k;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    #fastcgi_param HTTPS on;

    # Websockets connection path (configured in config/parameters.yml)
    location /ws {
    reset_timedout_connection on;

    # prevents 502 bad gateway error
    proxy_buffers 8 32k;
    proxy_buffer_size 64k;

    # redirect all HTTP traffic to localhost:8080;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-NginX-Proxy true;
    proxy_set_header X-Forwarded-Proto $scheme;

    proxy_redirect off;
    proxy_read_timeout 86400;

    # enables WS support
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection “upgrade”;

    error_log /var/log/nginx/error_ws_error.log;
    access_log /var/log/nginx/access_ws_access.log;

    The configuration parameters.yml is:

    I have cleaned cached, clear cookies, but still, my admin backend is reloading constantly.

    Appreciate any hint !

    Thanks !

    1. 2019-09-03_14-08-36-128x72
Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
  • #40357
    Andrey Yatsenko
    Andrey Yatsenko


    Have you applied the patch from the last answer for the index.php file?



    Thank you! Yes, it worked fine after applying the patch!



    Thank you. The patched worked !



    I just figure out that adding this patch to the index.php make it worked on the Oro Backend, but the Oro Frontend is now not loading…

    So it solved the original problem, but it gives a new error.

    Applied patch:

    I’ll let you know if I found the solution.

Viewing 4 replies - 1 through 4 (of 4 total)

The forum ‘OroCommerce’ is closed to new topics and replies.

You will be redirected to [title]. Would you like to continue?

Yes No