configuration / etc / nginx / sites-evaluable / default
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html/;
index index.php index.html index.htm index.nginx-debian.html;
server_name 10.152.16.97;
sendfile off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location /tapio2018 {
root /var/www/html/tapio2018/public;
#rewrite ^/tapio2018/(.*)$ /$1 break;
rewrite ^/tapio2018/(.*)$ /index.php?__path__=/$1 last;
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
set $newurl $request_uri;
if ($newurl ~ ^/tapio2018(.*)$) {
set $newurl $1;
root /var/www/html/tapio2018/public;
}
# Pass all PHP files to fastcgi php fpm unix socket
fastcgi_split_path_info ^(.+\.php)(/.+)$;
#fastcgi_pass unix:/var/run/php5-fpm.sock; #debian php5
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; #debian php7
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param REQUEST_URI $newurl;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
location ~ /\.ht {
deny all;
}
}
No error.log
[error] 11890 # 11890: * 1 FastCGI sent in stderr: "Unable to open primary script: /var/www/html/index.php (No such file or directory) " while reading response header from upstream, client: 10.152.16.76, server: 10.152.16.97, request: "GET /js/jquery-1.12.4.js HTTP / 1.1", upstream: "fastcgi: // unix: /var/run/php/php7.0-fpm.sock:", host: "10.152.16.97", referrer: " link "
In the browser the order URL is:
but it was meant to be
link right?
All css and js files do not work and any other route that appears is: ** No input file specified. **! Thanks!