• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

spring / apache / reverse proxy / POST not supported  RSS feed

 
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a little application which listens on 127.0.0.1:8080.
This application works like a charm - it is a REST service with a very simple html form. The html form sends an ajax request to the rest service.
When i debug this application, it works as expected.

When i put this application to my server, it does not work.


This is the output of the spring application when i click the submit button of my html form.



the html piece is this:


Anyone an idea what goes wrong here? Do i have to somehow configure the embedded tomcat in my spring application to allow POST requests?
If required i can also upload the piece of configuration of my apache server (the reverse proxy part), but i guess it has nothing to do with the problem i encounter... i guess
 
Ranch Hand
Posts: 1329
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to replicate your app, could you share the whole code, please?
 
olze oli
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This problem has been solved. I use now a complete subdomain for this part and it seems to work.
Currently struggling on another problem, the matrixregistration.config file is not found in the classpath.
If you still want to take a look at - feedback is very appreciated!
https://gitlab.com/olze/matrixregistration
 
Rancher
Posts: 427
6
Fedora IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Considering that it works when you debug, there must be something wrong on the server.  It says specially that POST is not supported so it's probably not a problem with your app but some configuration in your server.
 
Al Hobbs
Rancher
Posts: 427
6
Fedora IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, so it was a problem with the app?
 
Al Hobbs
Rancher
Posts: 427
6
Fedora IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by you use a complete subdomain?
 
olze oli
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess this is the common way to configure that: 1 app -> 1 subdomain.
This application is running on localhost:8080, the apache running on that production server runs on :80 and :443, firewall blocks everything else.
When a request comes in at matrix.myhost.de, all requests are redirected to localhost:8080 to that application.
I thought (and thats probably the mistake), that i somehow can get that working without creating an extra subdomain. So if myhost.de/register is accessed, i can somehow make the index.html work that all requests corresponding to this one event (registration) are forwarded. But seems like thats impossible. Or i am not advanced enough. So i created a new subdomain, matrix.myhost.de - all requests to this complete domain are now forwarded to the application, thats how it works now.
 
Angus Ferguson
Ranch Hand
Posts: 1329
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

This problem has been solved.



Great!
 
Al Hobbs
Rancher
Posts: 427
6
Fedora IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you have added another path to the url?  Like instead of matrix.mysite.de, you do mysite.de/matrix/register.   Would that have worked also you think?
 
olze oli
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Al Hobbs wrote:Would that have worked also you think?


I am pretty sure: no
 
Yeah. What he said. Totally. Wait. What? Sorry, I was looking at this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!