| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 102086 | 2009-08-06 14:01:00 | Apache - downloading files | WarNox (8772) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 798852 | 2009-08-06 14:01:00 | Hey! In Apache2: <a href="/home/gregor/ftp/test.zip">test.zip</a> Whenever I click on that link it says 'page cannot be displayed'. I've tried adding a .htaccess file in /var/www and also tried editing the /etc/apache2/mods-available/mime.conf file. In both of those I added AddType application/octet-stream .zip AddType application/octet-stream .exe Restarted apache and still got the same issue. Anyone know how to sort this out? Thank you, Gregor |
WarNox (8772) | ||
| 798853 | 2009-08-06 14:30:00 | Which error are you getting? Is it a 404, 403, 500, or something else? We really need more information before we can be of any help to you. Mimetype definitions are unlikely to be the problem. |
Erayd (23) | ||
| 798854 | 2009-08-06 20:47:00 | mv /home/gregor/ftp/test.zip /var/www Change the link to <a href="test.zip">test.zip</a> Then try :) Basically you need to put the files in your "webroot", which is usually /var/www That is then called "/" as far as the web server is concerned, so /home/gregor/ftp/test.zip is most probably /var/www/home/gregor/ftp/test.zip -- hence why it cant find it. |
Chilling_Silence (9) | ||
| 798855 | 2009-08-07 01:45:00 | mv /home/gregor/ftp/test.zip /var/www Change the link to <a href="test.zip">test.zip</a> Then try :) Basically you need to put the files in your "webroot", which is usually /var/www That is then called "/" as far as the web server is concerned, so /home/gregor/ftp/test.zip is most probably /var/www/home/gregor/ftp/test.zip -- hence why it cant find it. Gaaa.... well spotted - I missed that completely! |
Erayd (23) | ||
| 798856 | 2009-08-07 06:22:00 | Chilling_Silence: Yes, I know the files should be in /var/www, but I wanted to access them from /home/gregor/ftp/ because that's where they're already for ftp access :) I did put them in /var/www too and then edited the html code to read: <a href="192.168.1.250 Which fixed the issue internally. I'll try changing it to <a href="test.zip">test.zip</a> right now and see if that oversimplified method works :) |
WarNox (8772) | ||
| 798857 | 2009-08-07 06:24:00 | Ok so: <a href="test . zip">test . zip</a> works as it should . So do the files have to be in /var/www or it's subfolder for this to work? Can the files not be somewhere else on the filesystem? Thanks, Gregor |
WarNox (8772) | ||
| 798858 | 2009-08-07 09:15:00 | Try this: mkdir /var/www/ftp mount --bind /home/gregor/ftp /var/www/ftp I'm unsure how well symlinks work, but ^^ is guaranteed to work if you can (permissions willing) :) |
Chilling_Silence (9) | ||
| 798859 | 2009-08-07 10:28:00 | Yea I thought there would be a way to do it with symlinks. I'll try that at some point. Thanks for the help guys!! |
WarNox (8772) | ||
| 1 | |||||