Advertisement
Guest User

Untitled

a guest
Sep 24th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name example.com;
  4.  
  5. access_log /var/log/nginx/access.log;
  6. error_log /var/log/nginx/error.log;
  7.  
  8. location / {
  9. root /var/www/htdocs;
  10. }
  11.  
  12. location ~* ^/(en|ru|zh|es|pt_br) {
  13. add_header Content-Language $1;
  14. alias /var/www/htdocs/$1/;
  15. }
  16. }
  17.  
  18. $tree /var/www/htdocs
  19.  
  20. htdocs
  21. ├── about.html
  22. ├── archives.html
  23. ├── contact.html
  24. ├── es
  25. │   ├── about.html
  26. │   ├── archives.html
  27. │   ├── contact.html
  28. │   ├── index.html
  29. ├── index.html
  30. ├── pt_br
  31. │   ├── about.html
  32. │   ├── archives.html
  33. │   ├── contact.html
  34. │   ├── index.html
  35. ├── ru
  36. │   ├── about.html
  37. │   ├── archives.html
  38. │   ├── contact.html
  39. │   ├── index.html
  40. ├── zh
  41. │   ├── about.html
  42. │   ├── archives.html
  43. │   ├── contact.html
  44. │   ├── index.html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement