google-code-backups / xinc

Automatically exported from code.google.com/p/xinc
0 stars 0 forks source link

Xinc should not need document root #188

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
### What steps will reproduce the problem?
1. Install Zinc from PEAR and run the post-install script, accept the
default values
2. Do NOT set up the Apache virtual host (firewall issues, no spare ports,
no spare hostnames etc)
2a. Edit xinc.ini as needed
3. Try to load the Xinc main page

### What is the expected output? What do you see instead?
I expect to see the dashboard, but instead I see two aborted graphics - the
logo and the loading graphic. After sending all the data to handler.php
through .htaccess, it gets worse as no widget or plugin exists to handle
images or javascript.

### What version of the product are you using? On what operating system?
CentOS 5 with Jason Litka's repository, Xinc 2b196. Apache 2 with mod_php
and php5

### Please provide any additional information below.
The problem stems initially from Xinc's not having the virtualhost it
wants. I can't make a configuration that will work on all webservers but I
can show you the configuration that I used to make it work on mine.
Bear in mind that what I'm doing is suboptimal for performance reasons --
but it works!
My domain's document root has a bunch of junk in it. While I'm doing test
runs, trials and such, I like to use mod_rewrite to create virtual
subdomains without restarting apache.
So, Xinc wound up in a subdirectory of my webroot.
/var/www/html/xinc3
(Xinc3 because I was troubleshooting and the first 2 were duds)
In my /var/www/html .htaccess, below, note that I'm checking the domain
name before I start doing weird url rewriting things. The 2? is because
Windows apps cache the host file and I'm testing there.
Anyway, the one file was enough for me to try it out...
Watch me:

#continuous integration server, web frontend
#first, redirect the subdomain to the right subdirectory
RewriteCond %{HTTP_HOST} ^xinc2?\.imvucode\.com$
RewriteCond %{REQUEST_FILENAME} !^/xinc3/.*$
# no "L" so fall through to next rule as well
RewriteRule ^(.*)$ xinc3/$1 [QSA]
#now if we were looking for /.* we are looking for /xinc3/.*
RewriteCond %{HTTP_HOST} ^xinc2?\.imvucode\.com$
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
# serve the file if it exists and is allowed (NB "L", stop processing)
RewriteRule ^.*$ - [NC,L]
#otherwise send this to handler.php
RewriteRule ^(.*)$ xinc3/handler.php [QSA,L]

Original issue reported on code.google.com by SneakyWh...@gmail.com on 13 Dec 2008 at 10:52

GoogleCodeExporter commented 8 years ago
Is it true that without the javascript dependency, I would have been able to 
view the
dashboard even with it in its broken state? ;-)

Original comment by SneakyWh...@gmail.com on 13 Dec 2008 at 10:53

GoogleCodeExporter commented 8 years ago
sorry for spam, optimization... "(.*)" on my last line of code should be simply 
".*",
to cut down ever so slightly on the performance penalty.. Not that I'm a 
mod_rewrite
or regex expert

Original comment by SneakyWh...@gmail.com on 13 Dec 2008 at 10:57

GoogleCodeExporter commented 8 years ago
Third time lucky (sorry again).... I noticed a big bug in what I'd written and 
here
is the remedy:

#continuous integration server, web frontend
#first, redirect the subdomain to the right subdirectory
RewriteCond %{HTTP_HOST} ^xinc2?\.imvucode\.com$
RewriteCond %{REQUEST_FILENAME} !^/xinc3/.*$
# no "L" so fall through to next rule as well
RewriteRule ^(.*)$ xinc3/$1 [QSA]
#now if we were looking for /.* we are looking for /xinc3/.*
RewriteCond %{HTTP_HOST} ^xinc2?\.imvucode\.com$
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
# serve the file if it exists and is allowed (NB "L", stop processing)
RewriteRule ^.*$ - [NC,L]
#otherwise send this to handler.php
RewriteCond %{HTTP_HOST} ^xinc2?\.imvucode\.com$
RewriteRule ^.*$ xinc3/handler.php [QSA,L]

Original comment by SneakyWh...@gmail.com on 13 Dec 2008 at 11:45

GoogleCodeExporter commented 8 years ago

Original comment by opitz.al...@googlemail.com on 20 Aug 2011 at 10:30

GoogleCodeExporter commented 8 years ago

Original comment by opitz.al...@googlemail.com on 10 Apr 2012 at 11:43

GoogleCodeExporter commented 8 years ago
I fixed the dependancies to be a in document root. So after this you can 
install it in every directory like phpmyadmin or such.

Original comment by opitz.al...@googlemail.com on 9 Sep 2012 at 7:38

GoogleCodeExporter commented 8 years ago

Original comment by opitz.al...@googlemail.com on 9 Sep 2012 at 7:38

GoogleCodeExporter commented 8 years ago
Ready in SVN, will be released with Xinc 2.3

Original comment by opitz.al...@googlemail.com on 9 Sep 2012 at 7:43