Re: using spyce with multiple sites on some server?

Christopher Clarke <cclarke-wYfHrJ5eQDBWk0Htik3J/[email protected]> Wed, 13 Jun 2007 08:23:15 -0400
Newsgroups gmane.comp.python.spyce.general
Message-ID <[email protected]>
Hi
I have as many as four spyce servers running on a single machine
We use the spyceProjects to generate the project layout so that each  
site has its own config.py and basically runs on a different port
we have a rc.local script that starts everything up and we have  
virtual hosts set up with in the apache http.conf like
-------------------------------------------------------
<VirtualHost *:80>
   ServerName smw.secappserver
   ServerAlias smw
   ServerAdmin cclarke-wYfHrJ5eQDBWk0Htik3J/[email protected]
   DocumentRoot /var/www/smw/www/

<IfModule mod_rewrite.c>

   RewriteEngine On

   RewriteRule ^(.*\.spy) http://localhost:9673$1 [p]

   RewriteRule ^(.*\.vuh) http://localhost:9673$1 [p

   # for .vuh or 404 handling
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteRule ^(.*) http://localhost:9673$1 [p]
</IfModule>
</VirtualHost>


VirtualHost *:80>
   ServerName civ.secappserver
   ServerAlias  civ
   ServerAdmin cclarke-wYfHrJ5eQDBWk0Htik3J/[email protected]
   DocumentRoot /var/www/civ/www/

<IfModule mod_rewrite.c>

   RewriteEngine On

   RewriteRule ^(.*\.spy) http://localhost:8080$1 [p]

   RewriteRule ^(.*\.vuh) http://localhost:8080$1 [p

   # for .vuh or 404 handling
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteRule ^(.*) http://localhost:8080$1 [p]
</IfModule>
</VirtualHost>
------------------------
I tried the same approach with IIS, it works but the url that  
displays in the browser shows that the rewritten request instead of  
the original
Anyone having a similar problem?
Regards



On 12 Jun 2007, at 19:19, spyce-3j6+YF/[email protected] wrote:

> I've been using Spyce 2.0.3 for quite some time on a single site.   
> However, I'm starting to work on another site and would like to use  
> the same spyce server to handle the additional site.  The 2 sites have
> different base (aka root) directories so I'm not sure what the best  
> practice is in terms of modifying the spyceconf.py file.
>
> Currently, the root_dir option in spyceconf.py points to the  
> original site such that all files will be searched from their.   
> However, since the new site lives elsewhere this root_dir won't  
> work for the second site.
>
> How does one normally resolve this situation?
>
> Should I run 2 different spyce proxy servers (each pointing to it's  
> own spyceconf.py file using the --conf option to spyceCmd.py)?  I'm  
> using Apache to serve non-spyce pages and each site has a unique  
> virtual host.
>
> Ideally, I'd like to run a single spyce proxy server for both sites  
> but if that isn't possible, then the approach above should work.
>
> Thanks,
>
> Phil
>
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Spyce-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/spyce-users


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/