server {
listen 8000;
index index.html index.htm;
# this map is defined in http section
# in /etc/nginx/nginx.conf
# map $uri $custom_content_type {
# default "text/html";
# ~(.*\.html)$ "text/html";
# ~(.*\.css)$ "text/css";
# ~(.*\.js)$ "application/javascript";
# }
location /doc {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://gitlab.no.com/;
proxy_hide_header Content-Type;
add_header Content-Type $custom_content_type;
}
}
Last active
January 31, 2018 14:35
-
-
Save StudioEtrange/b6a479cd21c8a7e035a9fd2deca85794 to your computer and use it in GitHub Desktop.
gitlab expose web files (html, js, css) with nginx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment