Control Web Panel

WebPanel => CentOS 7 Problems => Topic started by: Aing on February 07, 2019, 02:37:44 PM

Title: Subdomain always pointing to subfolder
Post by: Aing on February 07, 2019, 02:37:44 PM
Hello,

I created subdomain but it always pointing to it sub directory, for example I wanted to install wp on tes.brontax.net but every time I visited in browser, it always redirected to brontax.net/tes
Can anyone help me to fix this? is there some setting I need to set? thanks.
Title: Re: Subdomain always pointing to subfolder
Post by: Netino on February 08, 2019, 03:02:39 AM
Yes.
What is your subdomain configuration..??
Title: Re: Subdomain always pointing to subfolder
Post by: Aing on March 09, 2019, 11:58:21 AM
Hi Netino,

Added subdomain adrenalin.id in main domain (brontax.net)
subdomain path is: /home/aing/public_html/adrenalin/dev   https://prnt.sc/mvg19g

I've disabled .htaccess in public_html and now the subdomain goes to dev.adrenalin.id but the path still going to:
/home/aing/public_html/dev (I create index.html and put "bx/dev"). If I disable dev directory the browser will show "not found error" https://prnt.sc/mvg7ci



Title: Re: Subdomain always pointing to subfolder
Post by: Netino on March 10, 2019, 09:59:15 PM
I afraid didn't undesrtood your question exactl.

If you want to create a subdomain not visible to your main domain, so you must to create the subdomain out of the area publicly acessible to main domain, for example in '/home/aing/adrenalin/'.
Do not forget to set ownership and permissions identical to your 'public_html' directory.
Code: [Select]
# chown aing:nobody /home/aing/adrenalin/
# chmod 750  /home/aing/adrenalin/