0 votes
by Rookie

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:


* 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.

If you have a question about Webinoly, please ask in English or Spanish.

To report a bug, please ask a question here with the bug tag.

News: Now you can use any external SMTP service in your server. All the server outgoing emails from any of your websites will be sent through this service.


Webinoly Support Paypal Donations Webinoly Support Bitcoin Donations

Your regular donations is what keep this project moving forward. If you like Webinoly, buy me a coffee or a beer to show support.

Affiliate Links

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