Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

有没有办法把访问地址变成类似www.abc.com/oj的配置方法? #67

Open
chenzhihuai1990 opened this issue Sep 12, 2018 · 1 comment

Comments

@chenzhihuai1990
Copy link

chenzhihuai1990 commented Sep 12, 2018

现在默认只能用www.abc.com之类的访问,但是想再加个后缀/oj。不知道能否通过配置实现?

这么做的原因是这样的:我们主机上只有一个域名用来放实验室主页。我们要再同一个主机上放uoj,但显然只能用www.abc.com/oj这样的域名。我们做法是把uoj运行在81端口,然后用apache把www.abc.com/oj的请求转发给81端口。

然而由于路径依赖有问题:里头有很多路径如css,js是按照绝对路径www.abc.com/css, www.abc.com/js来找的,那样子就不会被apache转发了。
即使解决css,js的路径问题,也不知道有没有其他问题。

希望作者能帮帮忙,提供一些解决方案或者建议?

@Candinya
Copy link

可以使用 nginx 的 ngx_http_substitutions_filter_module 批量过滤器(注意此模块需要手动安装

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants