PHP page in /public/ ?

Technical Support
  • #1

    Hi,
    i own a small forum running on NodeBB and i try to add a php page.
    So i added a link to /php (files are in /forum/public/php), but the file is downloaded, but not executed, i use a nginx proxy, and i added this in the config of my site (default in site-available)

     location ~ \.php$ {
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
        }
    

    But it's don't work.

    I tested with the same nginx server, on another port (without nodebb installed on this port), and it's working, so the problem come from NodeBB and NGinx, not from php and the config.

    Can you help me please?

  • Plugin & Theme Dev
    #2

    That's what ports are for: separating different applications.

    NodeBB runs with node.js; No (simple answer) way to combine this with php on the same port (and no one would want that).

    Usually you run NodeBB on one port, php application on another and use nginx/apache to proxy them to a sub-domain.

  • #3

    Ok, thank you for your fast response 😃


Suggested Topics


  • 0 Votes
    11 Posts
    461 Views

  • 0 Votes
    4 Posts
    216 Views

  • 0 Votes
    2 Posts
    470 Views

  • 0 Votes
    6 Posts
    367 Views

  • 0 Votes
    2 Posts
    1799 Views

| | | |