Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4341964
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:33:18+00:00 2026-05-21T11:33:18+00:00

I have this nginx vhost file server { # php/fastcgi listen 80; server_name trinityplex.com

  • 0

I have this nginx vhost file

server { # php/fastcgi
    listen       80;
    server_name  trinityplex.com www.trinity.com;
    access_log   /home/web/trinity_web/log/access.log;
    root /home/web/trinity_web/public;

    location / {
      index    index.html index.htm index.php;
    }
}

(for domain trinityplex.com), but if I go to trinityplex.com nginx display me 502 Bad gateway and throws the index file – chrome download index.php like a normal download.

It’s ridiculous I have never seen that. If I ask PHP for version it dumps

PHP 5.3.5-0.dotdeb.0 with Suhosin-Patch (cli) (built: Jan  7 2011 00:30:52) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH

Have you any ideas how to fix that?

Here is an nginx cofig file

user root;
worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;

    keepalive_timeout  65;
    server_names_hash_bucket_size 128;

    gzip  on;

    include /usr/local/nginx/sites-enabled/*;

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T11:33:19+00:00Added an answer on May 21, 2026 at 11:33 am

    You haven’t configured PHP in the server section so PHP files will obviously be sent as plain text. How are you planning to run PHP? As FastCGI?

    Update: The configuration you have shown here does still not include anything at all about PHP or FastCGI. Try something like this:

            # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
            #
            location ~ .php$ {
                    fastcgi_pass   127.0.0.1:9000;
                    fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    fastcgi_index  index.php;
                    include        fastcgi_params;
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ubuntu server running nginx. I just tried to enable a vhost
In my nginx.conf I have this line in my server {} section: log_format debug
I have a rewrite in nginx or Apache for this address: http://domain.com/hello to a
In line with this question: Lightweight web app server for PHP? The above question
The script I used fetched a file from https://www.dropbox.com/browse_plain/ $REMOTEDIR?no_js=true which now returns: HTTP/1.1
I'm using nginx with this script as FastCGI wrapper, that I start with: spawn-fcgi
I have one rails application needed to be deployed by passenger module nginx. This
I have a problem. My app server is nginx, on which my blog was
anybody knows how to configure server {} in configuration file of nginx server? I
I have Django web-site working on tornado and nginx. I took this tornado launcher

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.