AWS Beanstalk https troubles - laravel

in my beanstalk app (built using laravel framework), I have the following error :
I configured the load balancer as follow :
I moved the dns servers to route 53 and created the redirection in route43.
Accessing the website through http is working correctly. Accessing it through HTTPS do not work correctly. THe first page is well called but all other calls like /image/xx.jpg or css/xx.jpg is returning a 502 Bad gateway error.
Please help me !

found it. THe rules was not well declared in fact.
THe path pattern should be /* and not just /

Related

GoLang SPA returning 500 Internal Server Error on Refresh only

I have a golang API app that is currently serving double-duty as a Single Page App server with static content using the method shown here: https://hackandsla.sh/posts/2021-11-06-serve-spa-from-go/
Everything is working great in terms of navigation until users try to refresh URIs with encoded JSON in them. For example:
/licenses
will refresh file and draw the page as it would normally have appeared through internal history.push()
/licenses/show/%7B"options":%7B"container":"home","field":"date","order":"desc"%7D,"license":"00001a"%7D
will cause the 500 error.
I did the initial development with IIS as a web server so these Refresh errors never happened in that environment. And when the server is ready to be deployed I plan to use Caddy and reverse proxy the API and am assuming it will handle the Refreshes with the same aplomb as IIS.
But for now I am hoping to run tests against my simple server so I'd like to solve this issue out of curiosity in addition to development expediency.
Bottom line: What cause golang http.ListenAndServe to return 500 errors?
UPDATE:
As I need to be able to test and hand off for others I have converted to a querystring which http.ListenAndServe is happy with:
/licenses/show/%7B"options":%7B"container":"home","field":"date","order":"desc"%7D,"license":"00001a"%7D
causes 500 error
/licenses/show?state=%7B"options":%7B"container":"home","field":"date","order":"desc"%7D,"license":"00001a"%7D
works fine

springdoc-openapi-ui(Swagger UI) is appending :80 port to the base URL

I have a spring boot application running on the spring-boot-starter-parent:2.6.1 version and springdoc-openapi-ui:1.2.32. Swagger is working fine locally. The problem comes when I deploy the app inside Kubernetes cluster. That time spring doc open API is automatically redirecting to HTTP(:80) instead of HTTPS. If I remove :80 from the base URL then swagger-ui is coming up. Using the example given here I have changed the generated server URL, so my REST APIs are working fine now. But how to get rid of the :80 port getting appended in the base URL automatically? What is the issue here?
Switching to the latest version of springdoc-openapi-ui:1.6.6 solved the problem.

intervention-image with laravel 5.2 on ubuntu-server breaks the other calls

I am using laravel 5.2 to write services for a mobile app. all the calls are working fine. My project is deployed in ubuntu server.
Now I want to resize the uploaded images inorder to maintain same performance. I thought of trying intervention-image.
In local machine it worked fine. I installed intervention-image and set the provider and alias name, I included the alias name to controller. Once I do that and update the server, all the other calls are getting effected. I am getting 505 error.
It's the intervension-image which is causing this problem, I checked with previous upload and I am getting all the calls. Any suggestions?
I suggest you create a dev environment like your production , use vagrant . About error 505 check you error log file to have more detail about the bug

AJAX Post Request for application with Reverse Proxy not working

We have an two applications setup on same server. IIS 7.5,Windows 2008 R2.
Application 1 : Port 80/443
Application 2 (app2) : Port 444
We've used ARR Module with reverse Proxy to route all requests with testsite.com/app2/ to port 444 using article.
here.
All of the things are working fine, however when we try to do a AJAX POST request, it gives 502 Error, Probable due to Same Origin Code Policy violation since response is coming form different port number.
AJAX request works fine when we access website using port number like below:
testsite:444/app2/
We can't Use JSON P since we need to do HTTP Post, also I would want to avoid Using CORS, need some solution from server side.
Regards,
Tarun Panwar
The issue was that there was one module entry which was causing some issues, removed that module and everything was working fine.
Regrads,
Tarun

Deploy WSO2 Enterprise App Store in EC2 using ELB

I am deploying the WSO2 Enterprise App Store into EC2 behind an elastic load balancer (ELB) and having some trouble getting things configured properly.
I have configured $INSTALL_PATH/repository/conf/carbon.xml with the proper HostName and MgtHostName of the ELB DNS name and I can get to the front-end of the app store and to the admin console.
I am unable to:
get user registrations working throuth the front end app store
get to the back-office console
The issue appears to be in routing requests to the identity service. I get an error like the following:
You are now being redirected to Identity Server. If the redirection fails, please click on the button below.
I then get a timeout on the redirect to this RFC1918, non-routed, address:
https://10.x.x.x:9443/adminsamlsso
I see no errors in the logs on startup or throughout execution of the application.
How can I configure this application such that all requests are re-routed through the AWS ELB (not the WSO2 load balancer) and not through the direct, local, IP address?
Please modify following configurations as well,
Update the AssertionConsumerService property for all apps(store, publisher, social) within /repository/conf/sso-idp-config.xml
You can find few jaggery apps within /repository/deployment/server/jaggeryapps/ directory. Each app has its own json config file within config directory.
Eg :- for store app /repository/deployment/server/jaggeryapps/store/config/store.json
You have to update the identityProviderURL property within ssoConfiguration in those apps as well.(store, publisher and social)
If you are using ES-1.0.0 It's better if you can move to the latest 1.2.0 M2.
We also faced similar issue and now fixed in the master branch.
If you need to continue with the same 1.0.0 you can get rid of this issue by updating,
<ES_HOME>/repository/deployment/server/jaggeryapps/store/controllers/login.jag, <ES_HOME>/repository/deployment/server/jaggeryapps/publisher/controllers/login.jag
<ES_HOME>/repository/deployment/server/jaggeryapps/store/controllers/logout.jag, <ES_HOME>/repository/deployment/server/jaggeryapps/publisher/controllers/logout.jag
You have to update the postUrl in above four files correctly.
NOW : postUrl = "https://" + process.getProperty('carbon.local.ip') + ":" + process.getProperty('https.port');
It should be something like https://localhost:9443/
At the end post URL should be something like https://localhost:9443/admin/samlsso
<form method="post" action="<%=postUrl%>/admin/samlsso">

Resources