nginx反向代理设置问题

qwer_boo 2016-07-05 10:27:56
想用nginx设置反向代理,其中内网网站是asp.net,其端口改为了8050

设置内容如下:

worker_processes 1;
events {
worker_connections 1024;
}


http {
include mime.types;
default_type application/octet-stream;

#access_log logs/access.log main;
sendfile on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

server {
listen 80;
server_name localhost;

location / {
index index.asp index.aspx;
proxy_pass http:localhost:8050;
# index index.html index.htm;
}

现在我在浏览器中输入localhost,就会把网站首页的登录代码下载下来,这是为什么?为什么不能直接跳转到网站首页进行登录?
...全文
113 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
slwsss 2016-07-05
  • 打赏
  • 举报
回复
mime.types 配置下Content-Type
qwer_boo 2016-07-05
  • 打赏
  • 举报
回复
引用 2 楼 cqyy725 的回复:
proxy_pass http:localhost:8050;???
改了,http://localhost:8050/myWeb/
cqyy725 2016-07-05
  • 打赏
  • 举报
回复
proxy_pass http:localhost:8050;???

23,120

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧