开发者

URL /subdirectory match with port number

开发者 https://www.devze.com 2023-03-30 18:11 出处:网络
I would like to ask how to set in the webserver, APACHE. eg. like cPanel webmail, user only need to enter

I would like to ask how to set in the webserver, APACHE.

eg. like cPanel webmail, user only need to enter

http://www.example.com/webmail then开发者_开发技巧 it will match with http://www.example.com:2095/

I not sure it is set with .htaccess or set it at router level.

Can anyone advice how to do this?


It's called Reverse Proxy (even if you use it on the same server) : http://en.wikipedia.org/wiki/Reverse_Proxy

It can be done on Apache using standard modules mod_proxy and mod_rewrite. I have not done it myself on Apache, so I cannot tell if mod_rewrite will actually be required here ... but a lot of examples I have seen utilizing functionality of both of them.

There really a lot of examples around -- you should have no issues finding them. Start at the following links:

  • mod_proxy Apache manual
  • Using mod_rewrite for Proxying
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号