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

[MERN] can't allow cors headers for nodejs #1140

Closed
ReemMahm0ud opened this issue Sep 7, 2023 · 4 comments
Closed

[MERN] can't allow cors headers for nodejs #1140

ReemMahm0ud opened this issue Sep 7, 2023 · 4 comments
Assignees
Labels
mean solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@ReemMahm0ud
Copy link

Platform

AWS

bndiagnostic ID know more about bndiagnostic ID

d672519d-d932-6eae-3c31-1d3e2f161f67

bndiagnostic output

===== Begin of bndiagnostic tool output =====
? Resources: Found possible issues
? Connectivity: Found possible issues
? Processes: Found possible issues
? Apache: Found possible issues
[Resources]
Your instance has little available RAM memory. total used free shared buff/cache availableMem: 950 304 62 0 584 499Swap: 634 79 555
You could try to increase your instance's memory. Please check your cloud provider's documentation for more information.

[Connectivity]
Server ports 22, 80 and/or 443 are not publicly accessible. Please check the following guide to open server ports for remote access:
https://docs.bitnami.com/general/faq/administration/use-firewall/
[Processes]
One or more component's processes are not running:

apache not running

You can try to restart the process with the following command: $ sudo /opt/bitnami/ctlscript.sh start COMPONENT_NAME
[Apache]
Found recent error or warning messages in the Apache error log.```[Thu Sep 07 13:06:10.041309 2023] [ssl:error] [pid 502113:tid 140399324568832] SSL Library Error: error:0D07803A:asn1 encoding routines:asn1_item_embed_d2i:nested asn1 error (Type=PKCS8_PRIV_KEY_INFO)

[Thu Sep 07 13:06:10.041313 2023] [ssl:emerg] [pid 502113:tid 140399324568832] AH02312: Fatal error initialising mod_ssl, exiting.
[Thu Sep 07 13:06:10.041317 2023] [ssl:emerg] [pid 502113:tid 140399324568832] AH02564: Failed to configure encrypted (?) private key timesheet.3f.com:443:0, check /opt/bitnami/apache/conf/timesheet.3f.com.crt

bndiagnostic was not useful. Could you please tell us why?

the suggested guids are not relate it to my issue

Describe your issue as much as you can

hello,

i deployed my MERN stack on amazon lightsail bitnami and i made to virtual host one for backend nodejs and the other for frontend reactjs and i added the cors middleware in my nodejs and it works fine on another host called render.com but on lightsail bitnami, i have problem with POST request, every time i try to upload a file with POST request is says cors header is missing and the other requests like GET it fails in the middle but not every time and it says proxy error.
i added all the headers in vhost.conf and in bitnami.conf but after i edited them the website stopped and it's not working anymore.

so how can i fix this issue ?

thanks in advance,

@ReemMahm0ud ReemMahm0ud added the tech-issues The user has a technical issue about an application label Sep 7, 2023
@github-actions github-actions bot added the triage Triage is needed label Sep 7, 2023
@ReemMahm0ud
Copy link
Author

hello @gongomgra,

are you going to help me with my issue ?

thanks in advance,

@gongomgra gongomgra added the mean label Sep 11, 2023
@gongomgra
Copy link
Collaborator

Hi @ReemMahm0ud,

Thanks for using Bitnami. We highly recommend you to create a custom vhost configuration for your application and to add the required CORS configuration into the specific vhosts files for it. You can find more information on how to add a custom application in the guide linked below.

https://docs.bitnami.com/virtual-machine/infrastructure/lamp/configuration/configure-custom-application/

Also remember to restart the Apache server once you have updated the configuration for changes to take effect.

@github-actions
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 Sep 27, 2023
@github-actions
Copy link

github-actions bot commented Oct 2, 2023

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

@github-actions github-actions bot added the solved label Oct 2, 2023
@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mean 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

3 participants