Permalink
Browse files

Update Nginx Config

Update Nginx Config
  • Loading branch information...
imcmy committed Feb 7, 2017
1 parent 20de0ba commit 69187fa43627b2da1f0c84a138d31b69e3f8f491
View
@@ -1,2 +1,14 @@
# mirrors
中科院开源镜像小组
# mirrorBackend
OpenCAS Mirror Job Manager and Monitor
## Stage
Initialize
## Framework
Deploy Nginx, Crontab and Manage & Monitor Kit automatically.
View

This file was deleted.

Oops, something went wrong.
View

This file was deleted.

Oops, something went wrong.
View

This file was deleted.

Oops, something went wrong.
View
@@ -0,0 +1,23 @@
server {
listen [::]:80;
listen 80;
server_name mirrors.opencas.org
159.226.11.160
192.168.0.2
charset utf-8;
access_log /var/log/nginx/opencas.access.log main;
root /data/docs;
autoindex on;
location / {
}
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

This file was deleted.

Oops, something went wrong.
View

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
View
@@ -0,0 +1,46 @@
server {
listen [::]:80;
listen 80;
server_name mirrors.opencas.org
159.226.11.160
192.168.0.2
charset utf-8;
access_log /var/log/nginx/opencas.access.log main;
root /data/mirrors;
autoindex on;
location = / {
proxy_pass http://www.opencas.org/mirrors
}
location /nginx_status {
# Turn on nginx stats
stub_status on;
# I do not need logs for stats
access_log off;
# Security: Only allow access from 192.168.1.100 IP #
allow 159.226.11.161;
allow 192.168.0.3;
allow 2001:cc0:2004:1:225:90ff:fe3a:e6b5;
# Send rest of the world to /dev/null #
deny all;
}
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ timestamp\.txt$ {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Expires "0";
}
location ^~ /cran/ {
rewrite ^/cran/package=(.*)$ /cran/web/packages/$1/index.html permanent;
rewrite ^/cran/view=(.*)$ /cran/web/views/$1.html permanent;
}
}
Oops, something went wrong.

0 comments on commit 69187fa

Please sign in to comment.