NGinx Default public www location?

前端 未结 30 1135
野性不改
野性不改 2020-11-28 17:51

I have worked with Apache before, so I am aware that the default public web root is typically /var/www/.

I recently started working with nginx, but I ca

30条回答
  •  佛祖请我去吃肉
    2020-11-28 18:17

    The default Nginx directory on Debian is /var/www/nginx-default.

    You can check the file: /etc/nginx/sites-enabled/default

    and find

    server {
            listen   80 default;
            server_name  localhost;
    
            access_log  /var/log/nginx/localhost.access.log;
    
            location / {
                    root   /var/www/nginx-default;
                    index  index.html index.htm;
            }
    

    The root is the default location.

提交回复
热议问题