Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
757 views
by Rookie
Hello.

I host a small local website on Vultr with Webinoly with a simple html/php contact form.

The contact form I'm talking about is this : https://tours.homecomingbnb.gr/index.html#Booknow

When I submit the contact form I get 405 error, which cause by php not executing and downloading the file instead.

Try to access the contact form PHP file directly and you will see the issue:

https://tours.homecomingbnb.gr/php/contact-form.php

* The request should read the file and not download.

What should I do to make the php not download and read the file instead?

Thanks in advance for your help.
by Expert

Please, check this file: /etc/nginx/sites-available/tours.homecomingbnb.gr and send me the content. Also, check permissions and owner in all your site files/folders.

by Rookie
Hello @QROkes.

Sorry for the late response.

Here is the file you asked me to share :

# WebinolySSLredirectStart - HTTP to HTTPS Redirect
server {
    listen 80;
    listen [::]:80;
    server_name tours.homecomingbnb.gr;
    return 301 https://$host$request_uri;
}
# WebinolySSLredirectEnd
# WebinolyNginxServerStart
server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name tours.homecomingbnb.gr;

    # WebinolySSLstart
    ssl_certificate /etc/letsencrypt/live/tours.homecomingbnb.gr/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/tours.homecomingbnb.gr/privkey.pem;
    ssl_stapling on;
    ssl_stapling_verify on;
    ssl_trusted_certificate /etc/letsencrypt/live/tours.homecomingbnb.gr/chain.pem;
    # WebinolySSLend
    access_log /var/log/nginx/tours.homecomingbnb.gr.access.log we_log;
    error_log /var/log/nginx/tours.homecomingbnb.gr.error.log;

    root /var/www/tours.homecomingbnb.gr/htdocs;
       
    index  index.html index.htm;
    location / { try_files $uri $uri/ =404; }
       
    include common/locations.conf;
    include common/headers-http.conf;
    include common/headers-https.conf;
    include common/headers-html.conf;
    include /var/www/tours.homecomingbnb.gr/*-nginx.conf;
}
# WebinolyNginxServerEnd

Where should I check the permissions exactly?

1 Answer

0 votes
by Expert

You have created an HTML site, that's why you can't execute PHP.

Please, read the documentation!

Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...