2021-01-03 23:25:48 +08:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2021-01-08 18:05:32 +08:00
|
|
|
location ~ \.git* {
|
|
|
|
deny all;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /nohup.out {
|
|
|
|
deny all;
|
|
|
|
}
|
|
|
|
|
2021-01-03 23:25:48 +08:00
|
|
|
location ^~ /http {
|
2021-01-12 17:48:27 +08:00
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header REMOTE_ADDR $remote_addr;
|
2021-01-03 23:25:48 +08:00
|
|
|
proxy_pass http://localhost:8080;
|
|
|
|
}
|
|
|
|
}
|