Advertisement
para_bellum

nginx host local

Jan 25th, 2014
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. Je veux créer un alias local à localhost pour accéder à un site en développement.
  2. On commence par créer le fichier de configuration nginx dans /etc/nginx/conf.d
  3.  
  4. server {
  5. listen 80;
  6. server_name facetious-pelican;
  7.  
  8. location / {
  9. root /var/www/facetious-pelican/html;
  10. index index.html index.htm;
  11. }
  12. }
  13.  
  14. Suivi de `sudo nginx -s reload`.
  15.  
  16. Il faut ensuite modifier le fichier /etc/hosts pour y ajouter un alias à 127.0.0.1 :
  17.  
  18. 127.0.0.1 localhost facetious-pelican
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement