Nginx prompts noinputfilespecified.

Source: Internet
Author: User
Because the disk location is insufficient for migration, the vhost configuration file {code...} contains roothomewwwrootdefault; changed to rootmntwwwrootdefault; prompt noinputfilespecified. The mntwwwrootdefault directory must exist because the disk location is insufficient for migration and the vhost configuration file

server {    listen       80;    server_name ***.****.com;    index index.php index.html index.htm;    root  /home/wwwroot/default;        error_page   404   /404.html;    error_page   502 504   /502.html;    include enable-php.conf;    location / {        index index.php index.html ;    }    location /nginx_status    {        stub_status on;        access_log   off;    }    location /status {        stub_status on;        access_log   off;    }    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$    {      #  expires      30d;    }    location ~ .*\.(js|css)?$    {    #    expires      12h;    }    location ~ \.php$ {            #root html;            fastcgi_pass 127.0.0.1:9000;            fastcgi_index index.php;            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;            #fastcgi_param SCRIPT_FILENAME /mnt/wwwroot/default$fastcgi_script_name;            include fastcgi_params;    }    access_log  /home/wwwlogs/access.log  access;}  

Whereroot /home/wwwroot/default;Changeroot /mnt/wwwroot/default;Promptno input file specified.

/mnt/wwwroot/defaultThis directory must exist because other configuration servers are accessible.

The strange thing is that/home/wwwroot/defaultEnable, setroot /mnt/wwwroot/default;An error is reported,
The contents of these two folders are completely consistent.
.

Cause

Find the cause of the problem. There is.user.iniFiles, nginx used across directories, directly cp, this file has not changed the content oropen_basedir=/home/wwwroot/default:/tmp/:/proc/
Changeopen_basedir=/mnt/wwwroot/default:/tmp/:/proc/It's easy.

Reply content:

Because the disk location is insufficient for migration, the vhost configuration file

server {    listen       80;    server_name ***.****.com;    index index.php index.html index.htm;    root  /home/wwwroot/default;        error_page   404   /404.html;    error_page   502 504   /502.html;    include enable-php.conf;    location / {        index index.php index.html ;    }    location /nginx_status    {        stub_status on;        access_log   off;    }    location /status {        stub_status on;        access_log   off;    }    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$    {      #  expires      30d;    }    location ~ .*\.(js|css)?$    {    #    expires      12h;    }    location ~ \.php$ {            #root html;            fastcgi_pass 127.0.0.1:9000;            fastcgi_index index.php;            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;            #fastcgi_param SCRIPT_FILENAME /mnt/wwwroot/default$fastcgi_script_name;            include fastcgi_params;    }    access_log  /home/wwwlogs/access.log  access;}  

Whereroot /home/wwwroot/default;Changeroot /mnt/wwwroot/default;Promptno input file specified.

/mnt/wwwroot/defaultThis directory must exist because other configuration servers are accessible.

The strange thing is that/home/wwwroot/defaultEnable, setroot /mnt/wwwroot/default;An error is reported,
The contents of these two folders are completely consistent.
.

Cause

Find the cause of the problem. There is.user.iniFiles, nginx used across directories, directly cp, this file has not changed the content oropen_basedir=/home/wwwroot/default:/tmp/:/proc/
Changeopen_basedir=/mnt/wwwroot/default:/tmp/:/proc/It's easy.

Set $ phproot/mnt/wwwroot/default;
Fastcgi_param SCRIPT_FILENAME $ phproot/$ fastcgi_script_name;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.