Reputation: 395
The task: Serve the files located in a local folder on the server to clients over http/80. In the end, I plan to emulate the folder on the client but that doesn't concern my question.
So, there is an existing Rails app (rest based/xml) on that server that the clients would use in conjunction with these files.
I don't need any logic to be done on the files either on upload or download so I ask myself:
I guess the important thing here is http over port 80.
Thanks for any pointers or advice on the matter, cheers, Max
I know that with the good time investment I could look all this up for a couple of hours and figure it out but I am very very busy saves me alot of time.
Upvotes: 1
Views: 318
Reputation: 13791
Apache? Just add another <Directory>
section to your configuration for the Rails app:
Alias /static-files /path/to/the/static-files
<Directory /path/to/the/static-files>
Order allow, deny
Allow from all
# whatever else you need, Options, AllowOverride, etc.
</Directory>
Upvotes: 1
Reputation: 485
you can use X-Sendfile if you are using Apache or Lighty (see this blog post). Nginx supports X-Accel-Redirect. Both of these approaches will let your web server directly send the file without involving your rails app.
Upvotes: 0
Reputation: 1853
Put the files in a subdirectory of the "public" directory - as with stylesheets and javascripts
Upvotes: 0