配置代理
1 | 找到配置文件httpd.conf |
###动态的添加Header 参数1
2
3
4
5
6打开模块
LoadModule headers_module modules/mod_headers.so
<Proxy http://127.0.0.1:8080/dzhai-blog/*>
RequestHeader add Root_ContextPath "/dzhai-blog"
</Proxy>
###将根域名重定向到子域名1
2
3
4
5
6
7
8
9打开模块
LoadModule rewrite_module modules/mod_rewrite.so
<VirtualHost *:80>
ServerName dzhai.net
RewriteEngine on
#RewriteCond %{SERVER_PORT} !^80$
RewriteRule ^.*$ http://www.%{SERVER_NAME}%{REQUEST_URI} [L,R]
</VirtualHost>