Search code examples
linuxopencartdocument-root

how to view root /mnt/image files in linux server?


I have stored all the images in server root directory Ex: "/mnt/image/pic.jpg" now i want to view this image in browser,but normally can access only inside /var/www/... how to achieve this.


Solution

  • Link the directories

    ln -s /mnt/images /var/www/images

    After that you can access to /var/www/images/pic1.jpg without any problem (check user and group permissions if you cannot access)

    EDITED with @Anders advice

    Don't forget to add Options FollowSymLinks if you are using Apache web server