| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- server {
- listen 80;
- client_max_body_size 20M;
- # listen 443 ssl;
- # ssl_certificate /opt/secure/https_ssl/py163.xyz/py163.xyz.cer;
- # ssl_certificate_key /opt/secure/https_ssl/py163.xyz/py163.xyz.key;
- # ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
- # ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- #多个域名用空格分割,第一个为默认
- server_name payadmin.test www.payadmin.test;
- charset UTF-8;
- index default.html default.htm index.html index.htm;
- # 定义根目录
- set $root /var/www/pay-vue-admin/dist;
- # 设置站点路径
- root $root;
- # 限制IP
- # include ca/ip_limit.conf;
- location / {
- try_files $uri $uri/ /index.html;
- }
- # 防止目录浏览
- autoindex off;
- #sendfile off;
- #error_page 404 /err/404.htm;
- # 将php类型的请求转交给fastcgi
- #缓存图片周期30天
- location ~* \.(jpg|jpeg|gif|png|webp)$ {
- access_log off;
- expires 30d;
- }
- #缓存js和css7天
- location ~* \.(js|css)$ {
- access_log off;
- expires 7d;
- }
- # 访问日志:
- access_log /var/log/nginx/pay_vue_admin.access.log;
- error_log /var/log/nginx/pay_vue_admin.error.log;
- }
|