Question

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.

Was it helpful?

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top