Guest User

Untitled

a guest
Jun 22nd, 2014
2,379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. // Go code
  2.  
  3. func main() {
  4. http.Handle("/", http.FileServer(http.Dir("/tmp/nginx/html/")))
  5. if err := http.ListenAndServe(":8080", nil); err != nil {
  6. log.Fatal("ListenAndServe: ", err)
  7. }
  8. }
  9.  
  10. // NGINX conf
  11.  
  12. worker_processes 4;
  13. events {
  14. worker_connections 1024;
  15. }
  16. http {
  17. include mime.types;
  18. default_type application/octet-stream;
  19. sendfile on;
  20. keepalive_timeout 65;
  21. server {
  22. listen 8080;
  23. server_name localhost;
  24. location / {
  25. access_log off;
  26. root html;
  27. index index.html index.htm;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment