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 9142885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:53:17+00:00 2026-06-17T09:53:17+00:00

I have a WordPress installation up and running without issue. There is an element

  • 0

I have a WordPress installation up and running without issue. There is an element on the page that is not part of WP, but our own custom PHP script. It’s just there to handle form POST requests and process it in someway.

There is a requirement that we don’t have extensions that end in .php. My form is submitting to something like:

/places/signup.html

In my nginx config, I have this:

server {
    listen       87948; # It's behind a reverse proxy
    server_name domain.com www.domain.com;

    include /etc/nginx/proxy_params;

    index index.php;
    root /opt/www/public_html;

    location /favicon.ico {
        return 404;
    }

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
        expires max;
        log_not_found off;
    }

    location ~ \.php$ {
        add_header Access-Control-Allow-Origin "*";
        client_body_buffer_size 4096k;
        fastcgi_pass unix:/tmp/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME /opt/www/public_html/$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_script_name;
        include /etc/nginx/fastcgi_params;
    }

    # LOOK HERE
    location ~ /places/signup.html {
        root                             /opt/www/custom_scripts/;
        fastcgi_pass    unix:/tmp/php5-fpm.sock;
        fastcgi_param   SCRIPT_FILENAME  /opt/www/custom_scripts/signup-processor.php;
        fastcgi_param   QUERY_STRING     $query_string;
        fastcgi_param   REQUEST_METHOD   $request_method;
        fastcgi_param   CONTENT_TYPE     $content_type;
        fastcgi_param   CONTENT_LENGTH   $content_length;
        include         fastcgi_params;
    }

}

The problem is: fastcgi or nginx (I have no idea which) is taking the literal URL and looking for it in the location block’s root directive. From the error log:

2013/01/16 15:30:42 [error] 20533#0: *4 FastCGI sent in stderr:
“Unable to open primary script:
/opt/www/custom_scripts/places/signup.html (No such file or
directory)” while reading response header from upstream, client:
66.172.31.153, server: domain.com, request: “POST /places/signup.html HTTP/1.1”, upstream: “fastcgi://unix:/tmp/php5-fpm.sock:”, host:
“www.domain.com”

I thought “fastcgi_param SCRIPT_FILENAME /opt/www/custom_scripts/signup-processor.php;” would force it to use that specific script? I guess not?

  • 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-06-17T09:53:18+00:00Added an answer on June 17, 2026 at 9:53 am

    The include directive at the end :

        include         fastcgi_params;
    

    probably has another fastcgi_param directive with a SCRIPT_FILENAME parameter :

        fastcgi_param   SCRIPT_FILENAME  /another/script/file/name;
    

    As it’s at the end of the file, it will override your value.

    If you want to keep some settings from your fastcgi_params file, but override them with specific ones, you should place the include directive at the beginning :

    location ~ /places/signup.html {
        include         fastcgi_params;
        root                             /opt/www/custom_scripts/;
        fastcgi_pass    unix:/tmp/php5-fpm.sock;
        fastcgi_param   SCRIPT_FILENAME  /opt/www/custom_scripts/signup-processor.php;
        fastcgi_param   QUERY_STRING     $query_string;
        fastcgi_param   REQUEST_METHOD   $request_method;
        fastcgi_param   CONTENT_TYPE     $content_type;
        fastcgi_param   CONTENT_LENGTH   $content_length;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm running a contact-form-plugin on my wordpress installation. everything works fine but i want
Let's say I have a WordPress installation, with a page named About. If I
I have a standard Drupal installation with Wordpress to handle blog part. Structure is
I have a wordpress installation on sql server 2008 r2. I am not a
I have a WordPress installation. The problem that I have is the following: The
I have a WordPress installation that has been targeted quite heavily by a phishing
I have a website that is running on WordPress. In the document root of
I have imported a Blogger account into a Wordpress installation. But suddenly I saw
I'm have a wordpress installation where i have 2x custom fields, that both store
I have a wordpress installation I'd like to get rid off. It's been constant

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.