Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[opencart] OPENCART_ENABLE_HTTPS is not working for the administration pages #25038

Closed
kirilovvv opened this issue Apr 8, 2024 · 4 comments
Closed
Assignees
Labels
opencart solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@kirilovvv
Copy link

kirilovvv commented Apr 8, 2024

Name and Version

bitnami/opencart 18.0.0

What architecture are you using?

amd64

What steps will reproduce the bug?

I'm installing bitnami/opencart version 18.0.0 on a k8s cluster but when I try to access the admin interface I receive the following errors:
Screenshot 2024-04-08 at 15 46 26
Due to the following errors the page is not fully loaded, also the login fails with wrong credentials

Steps to reproduce:

  1. Install the chart with the provided configuration
  2. Open https:///administration

Are you using any custom parameters or values?

values.yaml:

opencartHost: "<host>"
opencartEnableHttps: true
service:
  type: ClusterIP
ingress:
  enabled: true
  hostname: <host>
  annotations: { cert-manager.io/issuer: "<issuer>" }
  tls: true

What is the expected behavior?

To successfully load the administration pages and be able to login.

What do you see instead?

Partial Login page (all the static content cannot be fetched) and the Login itself fails.

Additional information

Currently, the administration config file (/bitnami/opencart/administration/config.php) looks like this:

<?php
// APPLICATION
define('APPLICATION', 'Admin');

// HTTP
define('HTTP_SERVER', 'http://<host>/administration/');
define('HTTP_CATALOG', 'http://<host>/');
// DIR
define('DIR_OPENCART', '/opt/bitnami/opencart/');
define('DIR_APPLICATION', DIR_OPENCART . 'administration/');
define('DIR_SYSTEM', DIR_OPENCART . 'system/');
define('DIR_EXTENSION', DIR_OPENCART . 'extension/');
define('DIR_IMAGE', DIR_OPENCART . 'image/');
define('DIR_STORAGE', '/bitnami/opencart_storage/');
define('DIR_CATALOG', DIR_OPENCART . 'catalog/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/template/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');

// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', '<db_host>');
define('DB_USERNAME', 'bn_opencart');
define('DB_PASSWORD', '<db_password>');
define('DB_DATABASE', 'bitnami_opencart');
define('DB_PREFIX', 'oc_');
define('DB_PORT', '3306');

// OpenCart API
define('OPENCART_SERVER', 'https://www.opencart.com/');
define('HTTPS_SERVER', 'https://<host>/administration/');
define('HTTPS_CATALOG', 'https://<host>/');

After modifying HTTP_SERVER and HTTP_CATALOG configurations to point to HTTPS the page successfully loaded and I was able to login.
Modifications:

define('HTTP_SERVER', 'https://<host>/administration/');
define('HTTP_CATALOG', 'https://<host>/');
@kirilovvv kirilovvv added the tech-issues The user has a technical issue about an application label Apr 8, 2024
@github-actions github-actions bot added the triage Triage is needed label Apr 8, 2024
@kirilovvv
Copy link
Author

kirilovvv commented Apr 8, 2024

Also, I found that the HTTP_SERVER configuration for the client area (in /bitnami/opencart/config.php) is set to use https instead of http. That was fixed with bitnami/containers#53359

@carrodher
Copy link
Member

Thank you for bringing this issue to our attention. We appreciate your involvement! If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

Copy link

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Apr 25, 2024
@kirilovvv
Copy link
Author

bitnami/containers#64995 is merged so I am closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
opencart solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

2 participants