I have a static html website on a Nginx web server. For a contact form I use the Formspree service.

<form action="https://formspree.io/your@email.com"
    <input type="text" name="name">
    <input type="email" name="_replyto">
    <input type="submit" value="Send">

When I try to submit the completed form and the page needs to be redirected to the Formspree service, a 500 internal error appears.

the log error: "...client:, server: example.com, request: "POST / HTTP/1.1", host: "example.com", referrer: "https://example.com/"

What's the problem here?

  • What is the error from the error log? You didn't post the relevant part. – Michael Hampton Oct 24 '18 at 14:05
  • Thank you @Michael Hampton, I found the fix to the error problem. – Clemente Nogueira Oct 24 '18 at 14:18
  • I'm happy that you found the answer, but we still don't even know what the question is! Without the error message, nobody with a similar error will be able to find this answer. – Michael Hampton Oct 24 '18 at 14:22

Ubuntu 18.04 LTS server

I need to configure Nginx, in this case the Nginx website configuration vhost file.

nano /etc/nginx/sites-enabled/example.com.vhost

server {
  listen 80 default_server;
  listen [::]:80 default_server;

  root /var/www/example;

  index index.html;

  server_name example.com www.example.com;

  location / {
    try_files $uri $uri/ =404;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.