jenkins 安卓项目nginx 配置
windows中路径是这样的:
server {
listen 60080;
server_name download.apk.com; #没有使用域名,只是为了好看区分,懂 nginx 的应该知道
charset utf-8;
location / {
root /data/android_apk/apk;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}
}
server {
listen 60081;
server_name download.img.com;
charset utf-8;
location / {
root /data/android_apk/img_er;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}
}
启动nginx
/usr/local/nginx/sbin/nginx
停止nginx
/usr/local/nginx/sbin/nginx -s stop
配置文件路径:
/usr/local/nginx/conf
nginx 显示文件名不全(nginx 源码下载) :连接
多个静态目录: 用alias
server {
listen 60080;
server_name localhost; #没有使用域名,只是为了好看区分,懂 nginx 的应该知道
charset utf-8;
location / {
root /etc/nginx;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}
location /a {
alias /var/;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}
}
欢迎来撩 : 汇总all