Api 文档管理系统 RAP2环境搭建:https://incoder.org/2018/03/27/rap2/
RAP2环境搭建整理(超详细):https://www.jianshu.com/p/6c22e3a9fc15
nginx配置示例:
server { listen 80; listen 443 ssl http2; server_name rap.abc.com; access_log /data/wwwlogs/rap.abc.com_nginx.log combined; index index.html index.htm index.php; root /data/wwwroot/rap.abc.com/dolores/build; include /usr/local/nginx/conf/rewrite/other.conf; #error_page 404 /404.html; #error_page 502 /502.html; #需要做rewrite,不然访问会提示找不到文件 location / { try_files $uri /index.html; } location ~ .*\.(wma|wmv|asf|mp3|mmf|zip|rar|jpg|gif|png|swf|flv|mp4)$ { valid_referers none blocked *.fangpian-hd.com rap.fangpian-hd.com; if ($invalid_referer) { rewrite ^/ http://www.linuxeye.com/403.html; return 403; } } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ { expires 30d; access_log off; } location ~ .*\.(js|css)?$ { expires 7d; access_log off; } location ~ /\.ht { deny all; } }
0 条评论。