By billsnapper
I created a new droplet with Ubuntu 18.04 and needed to run a Rails 4.2.1 app using PostgreSQL. I have successfully got the app running using Passenger standalone. I am able to access this from a React webapp with no issue. When I try and get this to run via an Apache front end using Passenger defined in a VirtualHost I am getting permissions errors.
[Wed Jun 03 22:08:29.273380 2020] [authz_core:error] [pid 6382:tid 140663413569280] [client 73.227.226.192:46081] AH01630: client denied by server configuration: /var/www/html/
The only configuration directive I was able to find that looked related to /var/www/html permission was in the top level apache2.conf file.
<Directory /var/www> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>
Also, inside the default file, /etc/apache2/sites-available/000-default.conf, the DocumentRoot directive was “DocumentRoot /var/www/html”.
I am not even seeing any errors in /var/log/apache2/error.log related to my app trying to be served. There’s nothing in the app’s log directory.
Also, when I hit the server with my domain I am seeing the default Apache2 Ubuntu page. This is mapped via the default account and when I remove the file I see the permissions error. So it’s definitely processing the 000-default configuration but not my domain configuration and yes, it is enabled.
I have Rails apps running on older versions of Apache 2.2 and Passenger 4. This is bizarre. Also, I noticed that the Passenger process is running as root so maybe it’s a permissions thing, not certain.
Any help / pointers would be appreciated.
Thank you.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This question was answered by @bill.snapper:
Solved it. Turned out I needed to map the PassengerUser and PassengerGroup in order for this to run the application. This could have been done implicitly by adding a user and then placing the project with the same name as that user in a directory and Passenger would have figured it out.
Instead I chose to use the Passenger directives “PassengerUser” and “PassengerGroup” and set them to the user / group the app is mapped to.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.