I'm trying to get nginx to point to my index.html page along with imgs, CSS, JS, etc. that lies in a GoPATH, which is outside of /var/www/. My overall objective is to allow my website to run on port 80 and not 8080. Is it possible to do this? Below is what I currently have in the nginx.conf.
user www-data;
http {
include /etc/nginx/proxy.conf;
index index.html
}
server { # simple reverse-proxy
listen 80;
server_name dtrinh.com www.dtrinh.com;
access_log logs/dtrinh.access.log main;
# serve static files
# serve static files
location / {
root /go/src/ps/views/default/index.html;
expires 30d;
# pass requests for dynamic content to rails/turbogears/zope, et al
location / {
proxy_pass http://127.0.0.1:8080;
}
}
Reference: