Hello,
I'm trying to deploy a Rails Application in a server with Cpanel&WHM 76.0 (build 12), and EasyApache installed with the following packages "Apache 2.4, PHP 5.5, PHP 5.6, PHP 7.0, PHP 7.1, PHP 7.2, and Ruby 2.4". EasyApache 4 says is "up to date"
I'm having issue getting .htaccess inside my rails/public app to be propertly read.
When creating an application through "Application Manager" in cpanel i get this apache configuration inside /etc/apache2/conf.d/userdata/std/2_4/ folder
Although this launch the rails application, it doesn't read .htaccess file (where i have for example PassengerRuby directive).
If I add to the application conf file the Alias directive, it seems it seems to read .htaccess
But i get an error saying that PassengerRuby is not allowed in .htaccess
"/home/testuser/testapp/public/.htaccess: PassengerRuby not allowed here"
Although PassengerRuby is allowed in .htaccess context checking here Configuration reference - Apache - Passenger Library
I saw in /etc/apache2/conf.d/passenger.conf file that there is a PassengerDisableHtaccess, a property from EasyApache and not from Passenger, but disabling (and rebuilding http.conf with /scripts/rebuildhttpdconf, etc) didn't change anything, htaccess is not read (without the Alias directive), or improperly read (with the error i say).
I also don't get htaccess read if trying to deploy the app to root path (instead of subpath /testapp) with this configuration.
So anyone knows what's the recommended way to get this properly working with .htaccess ?
Thanks in advance
I'm trying to deploy a Rails Application in a server with Cpanel&WHM 76.0 (build 12), and EasyApache installed with the following packages "Apache 2.4, PHP 5.5, PHP 5.6, PHP 7.0, PHP 7.1, PHP 7.2, and Ruby 2.4". EasyApache 4 says is "up to date"
I'm having issue getting .htaccess inside my rails/public app to be propertly read.
When creating an application through "Application Manager" in cpanel i get this apache configuration inside /etc/apache2/conf.d/userdata/std/2_4/ folder
Code:
<Location "/testapp">
<IfModule mod_passenger.c>
PassengerAppEnv "development"
PassengerEnabled on
PassengerBaseURI "/testapp"
PassengerAppRoot "/home/testuser/testapp"
PassengerAppGroupName "testuser - testapp"
</IfModule>
</Location>
<Directory "/home/testuser/testapp">
Allow from all
Options -MultiViews
Options -Indexes
Require all granted
</Directory>
If I add to the application conf file the Alias directive, it seems it seems to read .htaccess
Code:
Alias /testapp /home/testuser/crm/public
<Location "/testapp">
<IfModule mod_passenger.c>
PassengerAppEnv "development"
PassengerEnabled on
PassengerBaseURI "/testapp"
PassengerAppRoot "/home/testuser/testapp"
PassengerAppGroupName "testuser - testapp"
</IfModule>
</Location>
<Directory "/home/testuser/testapp">
Allow from all
Options -MultiViews
Options -Indexes
Require all granted
</Directory>
"/home/testuser/testapp/public/.htaccess: PassengerRuby not allowed here"
Although PassengerRuby is allowed in .htaccess context checking here Configuration reference - Apache - Passenger Library
I saw in /etc/apache2/conf.d/passenger.conf file that there is a PassengerDisableHtaccess, a property from EasyApache and not from Passenger, but disabling (and rebuilding http.conf with /scripts/rebuildhttpdconf, etc) didn't change anything, htaccess is not read (without the Alias directive), or improperly read (with the error i say).
I also don't get htaccess read if trying to deploy the app to root path (instead of subpath /testapp) with this configuration.
Code:
<Location "/">
<IfModule mod_passenger.c>
PassengerAppEnv "development"
PassengerEnabled on
PassengerBaseURI "/"
PassengerAppRoot "/home/testuser/testapp"
PassengerAppGroupName "placem13 - testapp"
</IfModule>
</Location>
<Directory "/home/testuser/testapp">
Allow from all
Options -MultiViews
Options -Indexes
Require all granted
</Directory>
Thanks in advance