questions about configuring virtual host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi, 

I encountered a problem while configured virtual host. My experiment environment is Apache2+fastcgi+php-cgi.

I want to implement mass virtual hosting using rewrite rules based on apache rewrite module. That is, for a request url like: http://1000.xyz.com/test.php, apache will translate it to a absolute file path like: $DOCUMENT_ROOT/1000/test.php, and then get this script to execute. 

And my conf is: 
        RewriteEngine On
        RewriteCond "%{HTTP_HOST}" "!^www.xyz.com"
        RewriteCond "%{HTTP_HOST}" "^([^.]+)\.xyz\.com" [NC]
        RewriteRule "(.*)" "/%1$1" [PT]
I use inner redirection in order not to expose this detail to users. Besides, I succeeded when I use external redirection, namely the [R] tag instead of [PT] tag. 
When I use [PT] tag, apache cannot run expectedly. I request a url : http://1000.xyz.com/test.php, error message pops out like: The requested URL /1000/cgi-bin/php.fcgi/1000/test.php was not found on this server.

I don't know if this error results from fastcgi, is it the inappropriate config in fastcgi or inevitable problem by using it?

Really appreciate your help.

Vic
--
Best regards,

Rui Hu
----------------------------------------------------------------------------------------
State Key Laboratory of Networking & Switching Technology
Beijing University of Posts and Telecommunications(BUPT)
MSN: tchrbupt@xxxxxxxxx
-----------------------------------------------------------------------------------------



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux