全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 624|回复: 6

问个简单的nginx的问题

[复制链接]
发表于 2019-1-18 17:31:19 | 显示全部楼层 |阅读模式
按照 https://ymgblog.com/2017/09/27/170/ 安装了rtinst

配置了nginx为


server {
        listen 80;
        root /var/www;
        index index.html index.php index.htm;
        client_max_body_size 40m;
        location / {
               try_files $uri $uri/ =404;
        }
        location /rutorrent {
               client_max_body_size 40m;
               auth_basic "Restricted";
               auth_basic_user_file /etc/nginx/.htpasswd;
               include /etc/nginx/conf.d/php;
               include /etc/nginx/conf.d/cache;
        }
        location ~ /\.ht {
                deny all;
        }
}


直接用http://盒子 IP/rutorrent 就能自己接打开了,现在加个域名,就自己弄了下,改成

server {
        listen 80;
        root /var/www;
        server_name pt.qwer121.com;
        index index.html index.php index.htm;
        client_max_body_size 40m;
        location / {
               try_files $uri $uri/ =404;
        }
        location /rutorrent {
               client_max_body_size 40m;
               auth_basic "Restricted";
               auth_basic_user_file /etc/nginx/.htpasswd;
               include /etc/nginx/conf.d/php;
               include /etc/nginx/conf.d/cache;
        }
        location ~ /\.ht {
                deny all;
        }
}

但是还是需要http://pt.qwer121.com/rutorrent   才能打开,我如何把后面的 /rutorrent 去掉呢?
发表于 2019-1-18 17:34:54 | 显示全部楼层
头像太闪,我无法为你解答,快,关掉,眼都要瞎了
 楼主| 发表于 2019-1-18 22:47:22 | 显示全部楼层
ansheng 发表于 2019-1-18 17:34
头像太闪,我无法为你解答,快,关掉,眼都要瞎了

额。,。求个解答。。
发表于 2019-1-18 22:49:37 | 显示全部楼层
  1. location /rutorrent {
复制代码
 楼主| 发表于 2019-1-18 22:51:06 | 显示全部楼层

没懂啊兄弟。。
发表于 2019-1-19 11:49:06 | 显示全部楼层
配置 roxy_redirect
 楼主| 发表于 2019-1-21 17:43:54 | 显示全部楼层

真是没懂,那就是在nginx的伪静态里解决不了这个问题了被?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-11-28 14:41 , Processed in 0.091960 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表