I just installed and pushed the code server. when I try to access the other pages I'm getting nginx error like as below

*1 open() "/var/www/html/domain/public/admin" failed (2: No such file or directory),

server block of code is :

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    root /var/www/html/domain/public;

    index index.php index.html index.htm index.nginx-debian.html;

    server_name domain.com;

    location /phpmyadmin/ {
       try_files $uri =404;

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;

        # With php7.0-cgi alone:
        # With php7.0-fpm:
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;
        include fastcgi_params;

    location ~ /\.ht {
        deny all;

I have tried all possible solutions.But I keep getting the error. Can somebody help me, please?

  • Is there such a file as /var/www/html/domain/public/admin? What does your error log show when you try to access it? – vidarlo Dec 28 '17 at 12:00
  • @vidarlo : Thank you for the response :). Yes its there . I figured out the issue was with server block code where we mention the location { try_files $uri $uri/ /index.php?$args; } . – 06011991 Dec 29 '17 at 6:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.