Welcome! Log In Create A New Profile

Advanced

Re: Problem with aliases

Francis Daly
July 02, 2021 03:52AM
On Thu, Jul 01, 2021 at 04:37:56PM -0400, yosef wrote:

Hi there,

> unfortunately I still cant get this working, now the browser is not
> downloading the file, instead is showing me this message "No input file
> specified" let me show you what my code looks like now:

* what request do you make? (Probably something like "/proj1/index.php".)

* what file on your filesystem do you want your fastcgi server
to read, to process that request? (Probably something like
"/var/www/proj1/public_html/index.php".)

* what "fastcgi_param SCRIPT_FILENAME" value does nginx send to your
fastcgi server?

That last one is probably "what is inside snippets/fastcgi-php.conf?"

Note that every fastcgi server is (potentially) different, and will
read the "param" values sent in their own ways. But commonly, if
exactly one SCRIPT_FILENAME is sent, that is what is used.

You probably want something like

fastcgi_param SCRIPT_FILENAME $request_filename;

but other options exist, depending on details.

> location ^~ /proj1 {
> alias /var/www/proj1/public_html;

Somewhat unrelated -- that will work, but it is probably better to add
a / to both lines, so that they are

location ^~ /proj1/ {
alias /var/www/proj1/public_html/;

so that someone requesting /proj12/ will not accidentally be shown things
inside /var/www/proj1/public_html2/

Cheers,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Problem with aliases

yosef June 30, 2021 07:31PM

Re: Problem with aliases

Francis Daly July 01, 2021 01:58AM

Re: Problem with aliases

yosef July 01, 2021 04:37PM

Re: Problem with aliases

Francis Daly July 02, 2021 03:52AM

Re: Problem with aliases

yosef July 03, 2021 05:15PM

Re: Problem with aliases

Francis Daly July 04, 2021 09:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 250
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready