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 126.96.36.199: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.
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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!