[Nginx] Problème de configuration 404 not found (résolu)

Applications, problèmes de configuration réseau
Avatar de l’utilisateur
Armand01
Daikyu
Messages : 59
Inscription : ven. 12 oct. 2012, 23:55
Localisation : 127.0.0.1

[Nginx] Problème de configuration 404 not found (résolu)

Message par Armand01 »

Bonjour,

j'ai un serveur avec Nginx dessus, voila mon fichier de conf :

Code : Tout sélectionner

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   /www;
            index  index.html index.htm;
        }
	location /dl {
		root /downloads;
		autoindex on;
	}
    }
}
Mon problème est que quand je fais http://mon_serveur, j'ai bien ma page d'accueil comme je dois l'avoir (path sur le disque : /www/index.html). Mais quand je fais http://mon_serveur/dl pour afficher le contenu de /downloads (path sur le disque : /downloads) j'ai une 404 not found.
Habituellement j'utilise Apache mais le je voulais découvrir Nginx, donc c'est tout nouveau pour moi.

J'ai vérifié les permissions, tout est ok de ce point de vue, en même temps si ce n'était pas le cas je pense que j'aurai "403 Forbidden".

Merci d'avance pour votre aide :wink:

Armand.
Dernière modification par Armand01 le ven. 25 oct. 2013, 22:21, modifié 1 fois.
:!: This machine has no brain, use your own! :!:
Avatar de l’utilisateur
Armand01
Daikyu
Messages : 59
Inscription : ven. 12 oct. 2012, 23:55
Localisation : 127.0.0.1

Re: [Nginx] Problème de configuration 404 not found

Message par Armand01 »

Problème résolu :

Code : Tout sélectionner

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   /www;
            index  index.html index.htm;
        }
   location /dl {
      alias /downloads;
      autoindex on;
   }
    }
}
:!: This machine has no brain, use your own! :!:
Répondre