Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Go code
- func main() {
- http.Handle("/", http.FileServer(http.Dir("/tmp/nginx/html/")))
- if err := http.ListenAndServe(":8080", nil); err != nil {
- log.Fatal("ListenAndServe: ", err)
- }
- }
- // NGINX conf
- worker_processes 4;
- events {
- worker_connections 1024;
- }
- http {
- include mime.types;
- default_type application/octet-stream;
- sendfile on;
- keepalive_timeout 65;
- server {
- listen 8080;
- server_name localhost;
- location / {
- access_log off;
- root html;
- index index.html index.htm;
- }
Advertisement
Add Comment
Please, Sign In to add comment