Closed markpasc closed 12 years ago
No, although I've not tried it with Aliases.
It works fine running it out of a ~ directory for example:
http://example.com/~asc/privatesquare/www/
I can look at this in the morning. As for the relative URLs for signin/out that's just a hangover from old Flamework code; it should be updated (in both places, if necessary).
Just noticed this again. Did you ever get it sorted out? @vicchi has done a lot of work to get ps running in non-vanilla environments and added lots of documentation in the README file. That might offer some hints.
I took another look. I had to add a RewriteBase
to the www/.htaccess
, for all the reasons named in the documentation: it's a relative substitution in an htaccess, about a directory outside the DocumentRoot
. But then it seemed to work fine. (I got a database error checking in, since I neglected to migrate the database—I only updated code to the newest. But I signed in and got that far, so it looks to have worked.)
Just for reference that's:
<Directory /home/markpasc/privatesquare/www>
Options FollowSymLinks Indexes -MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<VirtualHost *:80>
ServerName example.com
Alias /privatesquare /home/markpasc/privatesquare/www
</VirtualHost>
and:
diff --git a/www/.htaccess b/www/.htaccess
index 74d807f..b1397d3 100644
--- a/www/.htaccess
+++ b/www/.htaccess
@@ -53,6 +53,7 @@ ErrorDocument 403 /403.php
# Get mod_rewrite fired up
RewriteEngine on
+RewriteBase /privatesquare/
# See also: the 'php-ini' command in the root Makefile
RewriteRule ^php.ini - [R=404,L]
Seems like the RewriteBase
has to name the path I used in the Alias
to work (it didn't work for me in the apache conf section), so I don't know that it can be fixed/defaulted in the www/.htaccess
file. Since that solves my problem, and the documented installation techniques use root domains, this seems fixed to me. Thanks!
I tried to set up privatesquare at a path on an existing domain, such as
www.example.com/privatesquare/
, using:but this made the
api/
endpoint return 404 responses. The Apache error page reads:and the error log gets a:
so seems like the relevant
RewriteRule
inwww/.htaccess
makes Apache misinterpret the rewritten aliased file path/home/markpasc/privatesquare/www/api_rest.php
as the URLwww.example.com/home/markpasc/privatesquare/www/api_rest.php
for some undoubtedly silly reason.I also noticed the forms in the sign-up and sign-in pages use root-relative URLs instead of the
abs_root_url
, so the forms only submit to the correct location when deployed to the root of a domain. Additionally I wasn't able to get privatesquare to authorize against Foursquare properly until I switched it to be at the root of a domain.Is it a boondoggle trying to run privatesquare somewhere besides
/
yet? I was only trying as I already have a domain with a few other apps like that, but can run it at a domain root for now. (The README mentions it should be possible but seems to me that statement could be boilerplate about Flamework.)