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
| server { listen 80; server_name client-server.test.com client-server2.test.com ; root /opt/www/client/; index index.html index.htm;
location ~ .*\.(jpgpngjpeg)$ { add_header 'Access-Control-Allow-Method' POST,GET; add_header 'Access-Control-Allow-Origin' "*"; add_header 'Access-Control-Allow-Credentials' 'true'; add_header Access-Control-Allow-Headers content-type; expires 30d; }
location / { add_header 'Access-Control-Allow-Method' POST,GET; add_header 'Access-Control-Allow-Origin' "*"; add_header 'Access-Control-Allow-Credentials' 'true'; add_header Access-Control-Allow-Headers content-type; expires 7d; }
access_log /opt/log/nginx/client-server.test.com.log; }
server { listen 443 ssl; server_name client-server.test.com client-server2.test.com; ssl_certificate /usr/local/nginx/conf/server.com.pem; ssl_certificate_key /usr/local/nginx/conf/server.com.key; root /opt/www/client/; index index.html index.htm;
location ~ .*\.(jpgpngjpeg)$ { add_header 'Access-Control-Allow-Method' POST,GET; add_header 'Access-Control-Allow-Origin' "*"; add_header 'Access-Control-Allow-Credentials' 'true'; add_header Access-Control-Allow-Headers content-type; expires 30d; }
location / { add_header 'Access-Control-Allow-Method' POST,GET; add_header 'Access-Control-Allow-Origin' "*"; add_header 'Access-Control-Allow-Credentials' 'true'; add_header Access-Control-Allow-Headers content-type; expires 7d; }
access_log /opt/log/nginx/client-server.test.com.log; }
|