-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
executable file
·150 lines (111 loc) · 3.15 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# Nginx Rewrite rules for dummyimage.com
# URLs like /123x456.jpg will 404 since the image file doesn't actually exist
# We will catch those requests and pass them to code.php and try to render them as images
error_page 404 = @404;
location @404 {
rewrite (.*) /code.php?x=$request_uri last;
}
# You might have errors if this location block is defined more than once. There can be only one.
location / {
rewrite ^/([\d].*) /code.php?x=$1$args;
# Standard Ad Sizes http://www.iab.net/iab_products_and_industry_services/1421/1443/1452
# Square Pop Up 250x250
rewrite ^/(s\w+pop)(.*) /code.php?x=250x250$2;
# Vertical Banner 120x240
rewrite ^/(ver\w+ban)(.*) /code.php?x=120x240$2;
# Full Banner 468x60
rewrite ^/(f\w+ban)(.*) /code.php?x=468x60$2;
# Half Banner 234x60
rewrite ^/(h\w+ban)(.*) /code.php?x=234x60$2;
# Micro Bar 88x31
rewrite ^/(m\w+bar)(.*) /code.php?x=88x31$2;
# Button 1 120x90
rewrite ^/(b\w+1)(.*) /code.php?x=120x90$2;
# Button 2 120x60
rewrite ^/(b\w+2)(.*) /code.php?x=120x60$2;
# Square Button 125x125
rewrite ^/(s\w+but)(.*) /code.php?x=125x125$2;
# Leaderboard 728x90
rewrite ^/(lea\w+rd)(.*) /code.php?x=728x90$2;
# Wide Skyscraper 160 x 600
rewrite ^/(w\w+sk\w+r)(.*) /code.php?x=160x600$2;
# Skyscraper 120 x 600
rewrite ^/(sk\w+r)(.*) /code.php?x=120x600$2;
# Half Page Ad 300 x 600
rewrite ^/(h\w+g)(.*) /code.php?x=300x600$2;
# Medium Rectangle 300x250
rewrite ^/(me)\w+(rec\w+)(.*) /code.php?x=300x250$3;
# Vertical Rectangle 240x400
rewrite ^/(ver)\w+(rec)(.*) /code.php?x=240x400$3;
# Large Rectangle 336x280
rewrite ^/(large|lrg)(rec)(.*) /code.php?x=336x280$3;
# Rectangle 180x150
rewrite ^/(rec)(.*) /code.php?x=180x150$2;
# Pop Under 720x300
rewrite ^/(pop)(.*) /code.php?x=720x300$2;
}
# Display Standards - http://en.wikipedia.org/wiki/File:Vector_Video_Standards2.svg
# CGA 320x200
location /cga {
rewrite ^/(cga)(.*) /code.php?x=320x200$2;
}
# QVGA 320x240
location /qvga {
rewrite ^/(qvga)(.*) /code.php?x=320x240$2;
}
# VGA 640x480
location /vga {
rewrite ^/(vga)(.*) /code.php?x=640x480$2;
}
# WVGA 800x480
location /wvga {
rewrite ^/(wvga)(.*) /code.php?x=800x480$2;
}
# SVGA 1024x600
location /svga {
rewrite ^/(svga)(.*) /code.php?x=1024x600$2;
}
# WSVGA 1024x600
location /wsvga {
rewrite ^(.*)$ /code.php?x=1024x600;
}
# XGA 1024x768
location /xga {
rewrite ^/(xga)(.*) /code.php?x=1024x768$2;
}
# WXGA 1280x800
location /wxga {
rewrite ^/(wxga)(.*) /code.php?x=1280x800$2;
}
# WSXGA 1440x900
location /wsxga {
rewrite ^/(wsxga)(.*) /code.php?x=1440x900$2;
}
# WUXGA 1920x1200
location /wuxga {
rewrite ^/(wuxga)(.*) /code.php?x=1920x1200$2;
}
# WQXGA 2560x1600
location /wqxga {
rewrite ^/(wqxga)(.*) /code.php?x=2560x1600$2;
}
# Video Standards
# NTSC 720x480
location /ntsc {
rewrite ^/(ntsc)(.*) /code.php?x=720x480$2;
}
# PAL 768x576
location /pal {
rewrite ^/(pal)(.*) /code.php?x=768x576$2;
}
# HD720 1280x720
location /hd720 {
rewrite ^/(hd720)(.*) /code.php?x=1280x720$2;
}
# HD1080 1920x1080
location /hd1080 {
rewrite ^/(hd1080)(.*) /code.php?x=1920x1080$2;
}
location \.(png|jpg|jpeg|gif)$ {
try_files $uri /index.php;
}