各种百度
D:\UPUPW_AP5.4\Apache2\conf\httpd.conf 增加配置 <IfModule mod_rewrite>RewriteEngine on RewriteMap lowercase int:tolowerRewriteMap vhost txt:D:/UPUPW_AP5.4/Apache2/vhost.map RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$RewriteCond ${vhost:%1} ^(/.*)$ RewriteRule ^/(.*)$ %1/$1</IfModule> 打开了 LoadModule rewrite_module modules/mod_rewrite.so 设置了 vhost.map 内容 s.fh.c D:/UPUPW_AP5.4/vhost/fh.c/shop fh.c D:/UPUPW_AP5.4/vhost/shopex.c/ host文件 127.0.0.1 fh.c 127.0.0.1 s.fh.c D:\UPUPW_AP5.4\Apache2\conf\httpd-vhosts.conf <VirtualHost *:80> DocumentRoot "D:/UPUPW_AP5.4/vhosts/fh.c" ServerName fh.c:80 ServerAlias s.fh.c ServerAdmin webmaster@fh.c DirectoryIndex index.html index.htm index.php default.php app.php u.php ErrorLog logs/fh.c-error.log CustomLog logs/fh.c-access_%Y%m%d.log comonvhost php_admin_value open_basedir "D:\UPUPW_AP5.4\vhosts\fh.c\;D:\UPUPW_AP5.4\memcached\;D:\UPUPW_AP5.4\phpmyadmin\;D:\UPUPW_AP5.4\temp\;C:\Windows\Temp\"<Directory "D:/UPUPW_AP5.4/vhosts/fh.c"> Options FollowSymLinks AllowOverride All Require all granted</Directory> 本人想用vhost.map实现 子域名绑定子目录 各种尝试无果 求指教!!! |
|