Reputation: 141
Well, I have a website in apache directory: /var/www/html
. Previously I had all my web images in /var/www/html/media
, so I used to put /media/imgX.jpg
for loading them. but now I need to put them in /mnt/imgs
.
For some reason, using this path does not work the same way as before.
I think it has something to do with permissions using files from outside apache directory but I am not sure about it. Any idea?
Upvotes: 1
Views: 1757
Reputation: 12453
The easiest way to add directories to Apache httpd is to use the "alias" module:
Alias /images "/mnt/imgs"
<Directory "/mnt/imgs>
Options Indexes
AllowOverride All
Require all granted
</Directory>
Once you have set up this, test it with: "yourdomain.com/images".
Of course:
Upvotes: 1