nginx不适用于简单配置

时间:2015-04-27 13:34:28

标签: nginx

我有nginx的下一个配置:

root@ubuntu:/# vim /etc/nginx/nginx.conf 
user www-data;
worker_processes 4;
pid /run/nginx.pid;

events {
        worker_connections 768;
        # multi_accept on;
}

http {
        server {
          location / {
            root /var/web/Project;
          }
        }
        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        ##
        # Gzip Settings
        ##

        gzip on;
        gzip_disable "msie6";

/ var / web / Project 中,我有 index.html 文件。服务器具有 192.168.136.129 地址。但是,当我转到 http://192.168.136.129/index.html http://192.168.136.129 时,会加载默认的nginx页面。 我做错了什么?重启nginx无济于事((

1 个答案:

答案 0 :(得分:0)

你重新启动了nginx服务吗?

sudo service nginx restart