- Server operating system version
- Ubuntu Linux Server 20.04
- Plesk version and microupdate number
- Obsidian 18.0.51
Hi,
New to Plesk. Can you please help me access subdomain image folder?
I have a website in httpdocs. I have a subdomain at the same directory level as httpdocs.
I cannot access urls for images between the 2 folders.
Domain:
/var/www/vhosts/PrimaryDomain.com/httpdocs/
/var/www/vhosts/SubDomain.com/
I've tried:
I've tried creating a 'photos' folder on the Home Directory and uploading the files to that folder (from the SubDomain) and having the PrimaryDomain access them.
I can save to the folder but my urls to the image never get past the PrimaryDomain.com structure.
ie... index.html (httpdocs) = <img src = "../photos" /> reads "PrimaryDomain.com/photos/"
ie... index.html (httpdocs) = <img src = "/var/www/vhosts/photos/" /> reads "PrimaryDomain.com/photos/"
ie... index.html (httpdocs) = <img src = "/var/www/vhosts/SubDomain/" /> reads "PrimaryDomain.com/"
I CAN access php scripts in photos, though.
Any help allowing me to fix this issue would be greatly appreciated.
Thank you in advance,
Sky
New to Plesk. Can you please help me access subdomain image folder?
I have a website in httpdocs. I have a subdomain at the same directory level as httpdocs.
I cannot access urls for images between the 2 folders.
Domain:
/var/www/vhosts/PrimaryDomain.com/httpdocs/
/var/www/vhosts/SubDomain.com/
I've tried:
- changing the director in my php file. -> always remains on the current domain.
- set open_basedir = none -> has no effect.
- set open_basedir = {WEBSPACEROOT}{/}{:}{TMP}{/}:/SubDomain.com/
- using "/var/www/vhosts/SubDomain.com/" in my url -> always remains on the current domain.
- restarting the server.
I've tried creating a 'photos' folder on the Home Directory and uploading the files to that folder (from the SubDomain) and having the PrimaryDomain access them.
I can save to the folder but my urls to the image never get past the PrimaryDomain.com structure.
ie... index.html (httpdocs) = <img src = "../photos" /> reads "PrimaryDomain.com/photos/"
ie... index.html (httpdocs) = <img src = "/var/www/vhosts/photos/" /> reads "PrimaryDomain.com/photos/"
ie... index.html (httpdocs) = <img src = "/var/www/vhosts/SubDomain/" /> reads "PrimaryDomain.com/"
I CAN access php scripts in photos, though.
Any help allowing me to fix this issue would be greatly appreciated.
Thank you in advance,
Sky