Reverse_proxy multidomain

kulbon

Verified User
Joined
Jun 7, 2020
Messages
15
Hi, I have nginx_apache running on my server. I need to have 4 domains pointed to one public_html. I have created every domain in DA. I have put all files in that one of these folders. So domain.com is a main domain. Then I need to point sub.domain.com into the same folder. When my server was running on apache only then I could do it in Custom HTTPD Configurations. I found sub.domain.com and in first section I wrote:
Code:
|?DOCROOT=/home/user/domains/domain.com/public_html/|
and it was working fine. After change to nginx_apache this site sub.domain.com is still pointed to domain.com and works as separate domain. BUT every single static file is 404. I can't open any single file like https://www.sub.domain.com/html/logo.png but https://www.domain.com/html/logo.png is working.
What can i do to fix it.
 
at the same page where you set Custom Httpd - there is (nginx proxy) link, it has same syntax
 
Yep, and I have tried to put the same

Code:
|?DOCROOT=/home/user/domains/domain.com/public_html/|

Then restart nginx and httpd but no luck.
 
I have cleaned Custom HTTPD settings for this domains and created symlinks. It's working :)
 
But if i want to redirect from site which belongs to one user to site belongs to another user then I have got Forbidden 403.
 
redirect by symlink? of course there will be error - it's owned by another user, also scripts limited by their document_root
 
Back
Top