原子核目录反向代理设置方法
IIS7:首先前往http://www.iis.net/extensions/ApplicationRequestRouting下载Application Request Routing,然后安装
安装完后在IIS管理界面找到ARR配置菜单:Application Request Routing
点击右侧开启Proxy项:server proxy settings..
打开配置界面 在Enable proxy前面打勾保存
在站点下建立web.config或者修改现有文件:
以abc目录为例
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="fxdl" stopProcessing="true">
<match url="^abc(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="(.*)" ignoreCase="false" />
</conditions>
<action type="Rewrite" url="http://www.yuanzihezhanqun.com/abc{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Apache:
打开Apache安装目录下 /conf/httpd.conf 设置文件,找到以下几行把前面的注释‘#’删除LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_modulemodules/mod_proxy_connect.so
LoadModule proxy_ftp_modulemodules/mod_proxy_ftp.so
LoadModuleproxy_http_modulemodules/mod_proxy_http.so
Include conf/extra/httpd-vhosts.conf然后修改站点配置文件:以abc目录为例 <VirtualHost *:80>
ServerAdmin webmaster@127.0.0.1 #主机名
#DocumentRoot "d:/**/htdocs/xx.com"
ServerName 127.0.0.1
ServerAlias 127.0.0.1
#ErrorLog "logs/xx.com-error.log"
#CustomLog "logs/xx.com-access.log" common
ProxyPass /abchttp://www.yuanzihezhanqun.com/abc
</VirtualHost> Nginx:打开站点配置文件,加入以下代码:location /abc/ {
proxy_pass http://www.yuanzihezhanqun.com;
}
Win系统宝塔面板+apache反向代理设置教程
页:
[1]