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>
<title>Welcome to nginx!</title>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
<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>

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
    #location ~ \.php$ {
    #    proxy_pass;

    # pass the PHP scripts to FastCGI server listening on
    #location ~ \.php$ {
    #    root           html;
    #    fastcgi_pass;
    #    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

  • What does your nginx log say? – EEAA Sep 22 '15 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 '15 at 2:00

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.