Comment masquer un dossier dans nginx ?
阿神
阿神 2017-05-16 17:13:54
0
1
376

Le répertoire racine Web se trouve à root "/phpstudy/www/xxx";

Mais le répertoire statique du programme se trouve sur www/static

C'est-à-dire que domain/www/static/xxxx.jpg est accessible lors de la demande

Comment masquer www ?

阿神
阿神

闭关修行中......

répondre à tous(1)
Peter_Zhu

Configuration

location /phpstudy/static/ {
    alias /usr/local/nginx/html/phpstudy/www/static/;
}       

Utilisez alias pour mapper un répertoire virtuel. alias映射一个虚拟目录即可。

访问地址 http://[ip]/phpstudy/static/a.txt

Adresse d'accès http://[ip]/phpstudy/static/a.txt🎜
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!