0

Here's what I have: /usr/share/nginx/htmlNouveau/images/logo.gif my photo logo.gif; /usr/share/nginx/htmlNouveau/index.html my index.html which is like this:

<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>

<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<img src="images/logo.gif" style="width: 400px;"/> 
<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

and /etc/nginx/conf.d/default.conf my default.conf which looks like this:

server {
    listen       80;
    server_name  localhost;

    #charset koi8-r;
    #access_log  /var/log/nginx/log/host.access.log  main;

    location / {
        root   /usr/share/nginx/htmlNouveau;
        index  index.html index.htm;
    }

    location /images/ {
        alias /usr/share/nginx/htmlNouveau/images;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    #location ~ \.php$ {
    #    root           html;
    #    fastcgi_pass   127.0.0.1:9000;
    #    fastcgi_index  index.php;
    #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
    #    include        fastcgi_params;
    #}

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}
}

But I have a problem, my photo is not displayed when I run the nginx on localhost. I am really stacked on this , if anybody could see where I am wrong? Thanks P.S. here's something what I got : http://prntscr.com/8j1y7s

2
  • What does your nginx log say?
    – EEAA
    Sep 22, 2015 at 1:56
  • @EEAA Well it works well, the page is displayed but the problem is that the photo is not displayed.
    – JPerk
    Sep 22, 2015 at 2:00

0

You must log in to answer this question.

Browse other questions tagged .