質問

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.

役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top