Control Web Panel

WebPanel => DNS => Topic started by: DragoCom on October 19, 2025, 04:00:24 AM

Title: Pointing domain to another folder
Post by: DragoCom on October 19, 2025, 04:00:24 AM
So since CWP doesn't show your domains under the CWP Root > Domains or in the user panel under Domains how can you set a domain to point to another dir like you can do with an addon domain? Say I have blahblah.com which is /home/blahblah/public_html and I want to point that domain to yadda.blahblah.com which is /home/blahblah/yadda.blahblah.com dir?

I cant find anywhere to do it in the root panel either.
Title: Re: Pointing domain to another folder
Post by: overseer on October 19, 2025, 12:42:56 PM
Under WebServers Conf Editor, edit the vhost configuration to point to your desired web root.
Title: Re: Pointing domain to another folder
Post by: DragoCom on October 19, 2025, 06:23:41 PM
Under WebServers Conf Editor, edit the vhost configuration to point to your desired web root.

I edited where it said root /home/blahblah/public and changed it to /home/blahblah/xxx.blahblah.com but it didn't change anything even after restarting apache, nginx and bind.

I did get this when restarting nginx:

Oct 19 20:20:58 viking nginx[2634746]: nginx: [emerg] invalid location modifier "~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|tx" in /etc/nginx/conf.d/vhosts/blahblah.com.conf:10
Oct 19 20:20:58 viking nginx[2634746]: nginx: configuration file /etc/nginx/nginx.conf test failed
Oct 19 20:20:58 viking systemd[1]: nginx.service: Control process exited, code=exited status=1
Oct 19 20:20:58 viking systemd[1]: nginx.service: Failed with result 'exit-code'.
Oct 19 20:20:58 viking systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
Title: Re: Pointing domain to another folder
Post by: DragoCom on October 19, 2025, 06:32:16 PM
I put it back to /public_html because nginx would not start back up, now when I try to start nginx back up it fails and gives me this:

Oct 19 20:30:35 viking kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:53:da:45:c0:69:11:cd:1c:25:08:00 SRC=79.124.62.122 DST=185.218.125.150 LEN=40 TOS=0x00 PREC=0x00 TTL=246 ID=33620 PROTO=TCP SPT=53918 DPT=59168 WINDOW=1024 RES=0x00 SYN URGP=0
Oct 19 20:30:35 viking mariadbd[2593988]: 2025-10-19 20:30:35 130 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB').
Oct 19 20:30:35 viking mariadbd[2593988]: 2025-10-19 20:30:35 130 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
Oct 19 20:30:35 viking mariadbd[2593988]: 2025-10-19 20:30:35 131 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB').
Oct 19 20:30:35 viking mariadbd[2593988]: 2025-10-19 20:30:35 131 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
Oct 19 20:30:36 viking kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=00:50:56:53:da:45:c0:69:11:cd:1c:25:08:00 SRC=88.210.63.88 DST=161.97.128.165 LEN=40 TOS=0x00 PREC=0x00 TTL=245 ID=39918 PROTO=TCP SPT=41362 DPT=3302 WINDOW=1024 RES=0x00 SYN URGP=0
Title: Re: Pointing domain to another folder
Post by: DragoCom on October 19, 2025, 06:39:50 PM
● nginx.service - The nginx HTTP and reverse proxy server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2025-10-19 20:36:58 CEST; 1min 23s ago
  Process: 2593916 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
  Process: 2639147 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)
  Process: 2639145 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
 Main PID: 2593917 (code=exited, status=0/SUCCESS)

Oct 19 20:36:58 viking.xxxxxxxx.xyz systemd[1]: Starting The nginx HTTP and reverse proxy server...
Oct 19 20:36:58 viking.xxxxxxxxx.xyz nginx[2639147]: nginx: [emerg] invalid location modifier "~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|tx" in /etc/nginx/conf.d/vhosts/blahblah.com.conf:10
Oct 19 20:36:58 viking.xxxxxxx.xyz nginx[2639147]: nginx: configuration file /etc/nginx/nginx.conf test failed
Oct 19 20:36:58 viking.xxxxxxx.xyz systemd[1]: nginx.service: Control process exited, code=exited status=1
Oct 19 20:36:58 viking.xxxxxxx.xyz systemd[1]: nginx.service: Failed with result 'exit-code'.
Oct 19 20:36:58 viking.xxxxxxx.xyz systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
Title: Re: Pointing domain to another folder
Post by: DragoCom on October 19, 2025, 06:57:52 PM
So I uninstalled nginx and reinstalled it and now I get this when trying to start nginx up:

● nginx.service - The nginx HTTP and reverse proxy server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2025-10-19 20:54:14 CEST; 8s ago
  Process: 2647291 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)
  Process: 2647289 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
 Main PID: 2593917 (code=exited, status=0/SUCCESS)

Oct 19 20:54:14 viking.xxxxxxxxxxx systemd[1]: Starting The nginx HTTP and reverse proxy server...
Oct 19 20:54:14 viking.xxxxxxxxxxx nginx[2647291]: nginx: [emerg] unknown log format "bytes" in /etc/nginx/conf.d/xxx.xxx.xxx.xxx.conf:4
Oct 19 20:54:14 viking.xxxxxxxxxxx nginx[2647291]: nginx: configuration file /etc/nginx/nginx.conf test failed
Oct 19 20:54:14 viking.xxxxxxxxxxx systemd[1]: nginx.service: Control process exited, code=exited status=1
Oct 19 20:54:14 viking.xxxxxxxxxxx systemd[1]: nginx.service: Failed with result 'exit-code'.
Oct 19 20:54:14 viking.xxxxxxxxxxx systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
Title: Re: Pointing domain to another folder
Post by: DragoCom on October 19, 2025, 07:27:21 PM
I fixed it. I redownloaded and replaced mime.types. I got the default from https://raw.githubusercontent.com/nginx/nginx/master/conf/mime.types

Worked perfect, now to the original issue, it's not working to change the root /home/etc etc etc. I did it in the blahblah.com conf file and not the .ssl file, do I need to do ssl instead or both?
Title: Re: Pointing domain to another folder
Post by: overseer on October 19, 2025, 09:51:52 PM
Depends on your need -- but in the modern era, I would think the .ssl.conf file would actually be the primary and the non-https would actually be secondary (and probably 301 redirect to the https version anyway. :)