公司服务器做了内外网之分,外网不能通过ip访问,做了内网穿透,通过域名+开放端口访问,由nginx监听,现在有个问题就是域名解析只能用隐性url,但是nginx只能访问首页,地址后面跟的地址无法解析,怎么办,
比如 followme.gfline.com/partner-recruitment.html
直接解析了 followme.gfline.com 跳到了首页,而后面的 partner-recruitment.html 没效果。
比如 followme.gfline.com/partner-recruitment.html
直接解析了 followme.gfline.com 跳到了首页,而后面的 partner-recruitment.html 没效果。
listen 8087;
server_name followme.gfline.com;
index index.html index.htm; location / {
proxy_pass http://followme.gfline.com:8111/;
} location /.(htm|html|map|gif|jpg|jpeg|png|bmp|swf|ioc|rar|zip|txt|flv|mid|doc|ppt|pdf|xls|mp3|wma)$ {
proxy_pass http://followme.gfline.com:8111/;
root "/var/www/html/followme/public";
# try_files $uri $uri/ /index.php?$query_string;
try_files $uri $uri/ /index.html =404;
# proxy_redirect off;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_pass http://branch.followme.org:8011;
}
location ~ .*\.(htm|html|map|gif|jpg|jpeg|png|bmp|swf|ioc|rar|zip|txt|flv|mid|doc|ppt|pdf|xls|mp3|wma)$ {
root "/var/www/html/followme/public";
# try_files $uri $uri/ /index.php?$query_string;
try_files $uri $uri/ /index.html =404;
# proxy_redirect off;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_pass http://branch.followme.org:8011;
}}
为不是 http://ollowme.gfline.com:8087/partner-recruitment.html