1

I would like to create an alias for all URIs that belong to www.example.org/app which should refer to /var/www/htdocs/app/page/

The start.php should be the index-page.

I got this file-structure:

/var/www/htdocs/
/var/www/htdocs/app
/var/www/htdocs/app/page
/var/www/htdocs/app/page/start.php

Now I got a nginx.conf like that:

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

# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

# Directives to send expires headers and turn off 404 error logging.
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
       access_log off; log_not_found off; expires max;
}

location /app {
alias /var/www/htdocs/app/page/;
      location ~ \.php$ {
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        if (!-f $document_root$fastcgi_script_name) {
                return 404;
        }

        include fastcgi.conf;
        fastcgi_index start.php;
#       fastcgi_pass phpcgi;
        fastcgi_pass unix:/var/www/htdocs/conf/sockets/nginx-php-fcgi.sock;

      }
}

Unfortunately I'm getting No input file specified. when I try to open example.org/app. If I open example.org/app/robots.txt there is no problem and the robots.txt is displayed.

How can I fix that?

MyFault
  • 427
  • 1
  • 6
  • 21
  • Possible duplicate of [pesky popular "No input file specified." with nginx\_php-fastcgi](http://stackoverflow.com/questions/7297421/pesky-popular-no-input-file-specified-with-nginx-php-fastcgi) – Syed mohamed aladeen May 23 '16 at 11:08
  • No, thats not the problem. fpm-config contains correct values. – MyFault May 23 '16 at 11:13

0 Answers0