ghproxy/ghproxy.conf
2021-01-12 17:48:27 +08:00

40 lines
901 B
Plaintext

server {
listen 80;
#server_name gh.2i.gs;
# return 301 https://gh.2i.gs$request_uri;
#}
#server {
listen 443 ssl http2;
server_name gh.2i.gs;
charset utf-8;
access_log /var/log/nginx/ghproxy.access.log main;
error_log /var/log/nginx/ghproxy.error.log;
# ssl_trusted_certificate /etc/nginx/conf.d/2i.gs.pem;
# ssl_certificate /etc/nginx/conf.d/2i.gs.pem;
# ssl_certificate_key /etc/nginx/conf.d/2i.gs.key;
root /var/www/ghproxy;
location / {
index index.html;
try_files $uri $uri/ =404;
}
location ~ \.git* {
deny all;
}
location /nohup.out {
deny all;
}
location ^~ /http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header REMOTE_ADDR $remote_addr;
proxy_pass http://localhost:8080;
}
}