Join the community today
Become a Member

Added a new ngnix vhost domain and php files are being downloaded rather than executed

Discussion in 'Other Web Apps usage' started by MyWin, Apr 18, 2024.

  1. MyWin

    MyWin New Member

    5
    1
    3
    Mar 13, 2019
    Ratings:
    +1
    Local Time:
    3:36 PM
    I know it's not a problem with php being installed or running as it work on the other domains, this is the new vhosts file that I've made a few changed to to try and fix it with no luck. I assume it's something minor I've missed? Running php 7.4.22


     
  2. MaximilianKohler

    MaximilianKohler Member

    179
    5
    18
    Jun 23, 2023
    Ratings:
    +23
    Local Time:
    7:36 AM
  3. eva2000

    eva2000 Administrator Staff Member

    53,248
    12,117
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,655
    Local Time:
    12:36 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    with Nginx and PHP-FPM, serving PHP files depends on the PHP app and whether the PHP app requires additional Nginx rewrite/rules beyond Centmin Mod's default created Nginx vhost/PHP-FPM configuration. If your PHP app needs additional Nginx rules or PHP-FPM config changes, it may result in symptoms of PHP files prompted in downloads or PHP files not working.

    What PHP web app are you using? Have you contacted PHP web app developers and/or consulted the PHP web app user documentation to see if Nginx and/or PHP-FPM specific rules need adding?