correct configuration for nginx to localhost?

前端 未结 1 898
时光说笑
时光说笑 2021-01-31 02:14

I just installed nginx and php fastcgi about an hour ago, and after reading examples of a quick starting configuration, and the nginx documentation etc, I just cant get it to wo

1条回答
  •  一整个雨季
    2021-01-31 02:49

    Fundamentally you hadn't declare location which is what nginx uses to bind URL with resources.

     server {
                listen       80;
                server_name  localhost;
    
                access_log  logs/localhost.access.log  main;
    
                location / {
                    root /var/www/board/public;
                    index index.html index.htm index.php;
                }
           }
    

    0 讨论(0)
提交回复
热议问题