• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

spring / apache / reverse proxy / POST not supported

 
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 1402
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 669
15
TypeScript Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 669
15
TypeScript Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, so it was a problem with the app?
 
Al Hobbs
Bartender
Posts: 669
15
TypeScript Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 1402
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

This problem has been solved.



Great!
 
Al Hobbs
Bartender
Posts: 669
15
TypeScript Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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


I am pretty sure: no
 
Whose rules are you playing by? This tiny ad doesn't respect those rules:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic