You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.
Casino works fine for me with rails 4.1 (branch rails4) if the casino application uses the root url, but there are some gotchas if I install casino (using a simple new plain rails 4.1 app) for use on a sub url like myhost.example.net/zas. We use a lot of applications through a reverse proxy, so each application including casino has to use a sub url to separate namespaces.
Here is what I have done to get it working using /zas as sub url:
# /etc/apache2/conf.d/zas.conf
<Location /zas>
PassengerBaseURI /zas
PassengerAppRoot /var/srv/www/casinoapp/current
RackEnv production
</Location>
<Directory "/var/srv/www/casinoapp/current/public">
AllowOverride All
order allow,deny
allow from all
</Directory>
Thank you for your analysis! I'll probably have some time to work on CASino next week. The proposed solution seems reasonable and I don't think it will break anything.
Casino works fine for me with rails 4.1 (branch rails4) if the casino application uses the root url, but there are some gotchas if I install casino (using a simple new plain rails 4.1 app) for use on a sub url like myhost.example.net/zas. We use a lot of applications through a reverse proxy, so each application including casino has to use a sub url to separate namespaces.
Here is what I have done to get it working using /zas as sub url:
I've got the idea for the default_url_options from here: activeadmin/activeadmin#101 (comment)
There is a special issue with redirects in routes.rb within an engine, for rails4 I use the following modification to casino/config/routes.rb:
Just remove the '/' from '/login' here. Rails4 then respects SCRIPT_NAME for sub urls. More info on this: rails/rails#7977 (comment)
And last but not least asset precompilation must respect the sub url on deployment:
The only issue here for casino (using the current rails 4 branch and rails 4.1) is the '/' in front of login which should be removed.
The other stuff can be done by using a own minimal rails application instead of CASinoApp.
The text was updated successfully, but these errors were encountered: