I have a problem with Rails + Passenger + Apache + Alias. I tried to run a rails app over an Alias and I declared this virtualhost
<VirtualHost *:80>
Alias /smart_data /home/pablo/Proyectos/Net-Works/SmartData/smart_data/public
<Location /smart_data>
PassengerBaseURI /smart_data
PassengerAppRoot /home/pablo/Proyectos/Net-Works/SmartData/smart_data
</Location>
<Directory /home/pablo/Proyectos/Net-Works/SmartData/smart_data/public>
Allow from all
Options -MultiViews
Require all granted
</Directory>
</VirtualHost>
It works ok, but my app read a file from the folder /public/data/ and apache try read this file from /var/www/html/data.
Could someone help me?.
You need to define a DocumentRoot within the VirtualHost tags.
<VirtualHost *:80>
# Add this line:
DocumentRoot /home/pablo/Proyectos/Net-Works/SmartData/smart_data/public
</VirtualHost>
Since no DocumentRoot is defined there, it's going with the default one (defined somewhere in the same config file, but not nested in any VirtualHost tag)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With