Advertisement
Guest User

subdomains

a guest
Jun 26th, 2020
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. events {
  2. worker_connections 8000;
  3. multi_accept on;
  4. }
  5.  
  6. http {
  7. charset utf-8;
  8. include /etc/nginx/mime.types;
  9. default_type application/octet-stream;
  10.  
  11. access_log /dev/stdout;
  12. error_log /dev/stderr;
  13.  
  14.  
  15. server {
  16. listen 80 reuseport;
  17. listen [::]:80 reuseport;
  18. server_name .localhost;
  19.  
  20. location / {
  21. default_type text/html;
  22. return 200 '<a href="http://app1.localhost">app1</a><br /><a href="http://app2.localhost">app2</a><br /><a href="http://app3.localhost">app3</a>';
  23. }
  24. }
  25.  
  26. server {
  27. listen 80;
  28. listen [::]:80;
  29. server_name app1.localhost;
  30.  
  31. location / {
  32. default_type text/html;
  33. return 200 'app1';
  34. }
  35. }
  36.  
  37. server {
  38. listen 80;
  39. listen [::]:80;
  40. server_name app2.localhost;
  41.  
  42. location / {
  43. default_type text/html;
  44. return 200 'app2';
  45. }
  46. }
  47.  
  48. server {
  49. listen 80;
  50. listen [::]:80;
  51. server_name app3.localhost;
  52.  
  53. location / {
  54. default_type text/html;
  55. return 200 'app3';
  56. }
  57. }
  58.  
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement