Author Topic: The big Question  (Read 16766 times)

0 Members and 1 Guest are viewing this topic.

Offline
***
The big Question
« on: February 12, 2020, 10:23:12 PM »
So since day #1, I have wondered why we have to have a domain associated with a user.  The requirement to have a domain means that one of my domains will be in /public_html and not /public_html/myuserdomain.com

This is a MAJOR pain in my arse.  It means all of my files and folders will be scattered about with all of my other domain folders.  From a housekeeping perspective, it looks like a total cluster F.

Offline
****
Re: The big Question
« Reply #1 on: February 12, 2020, 10:42:07 PM »
Every hosting panel does the same thing.  Setup add-on domains of you want them all under one account.
Google Hangouts:  rcschaff82@gmail.com

Re: The big Question
« Reply #2 on: February 12, 2020, 11:59:26 PM »
I've always favoured the /home/username/public_html approach.
From a security perspective, I've never advocated the use of add-on domains. Hack one account and there's potential to hack them all, within the same account. Need multiple websites/domains, then be a "Reseller". Period.

Offline
***
Re: The big Question
« Reply #3 on: February 13, 2020, 12:30:10 AM »
Every hosting panel does the same thing.  Setup add-on domains of you want them all under one account.

You guys are not understanding.  When I create an account for a user, the users domain is /public_html.  Now lets say the same user wants to add 10 domains. The public_html folder will have all of the files for the main website.  But it will also have domain1-10 directories.  What I want to know is why the main domain cant be /public_html/maindomain.com .  this way the public_html directory will only have 11 directories and no files.  Nice and clean.

Offline
***
Re: The big Question
« Reply #4 on: February 13, 2020, 12:56:13 AM »
I have actually used a domain that I dont own just to fulfill the cpanel requirements.  Then there will never be any files in the public_html directory...only web directories.

Offline
****
Re: The big Question
« Reply #5 on: February 13, 2020, 01:26:54 AM »
Simple workaround.  Create an account with the domain localhost.localdomain.  << DOesn't server anything.  Addon domains now got to /public_html/mydomainname.com

Now public_html doesn't have to server any website.

Of course you could always create your own template for apache/nginx
Location of the files: /usr/local/cwpsrv/htdocs/resources/conf/web_servers/ | http templates = .tpl | https templates = .stpl |

Create a new template that points your main domain to public_html/(domian), and use that template for your website.   Custom templates will not get overwritten.
Google Hangouts:  rcschaff82@gmail.com

Re: The big Question
« Reply #6 on: February 13, 2020, 01:38:21 AM »
Now lets say the same user wants to add 10 domains.
Actually, I do know what you are saying and have come across quite a few clients that have used add-on domains, to host multiple customers/websites under their own account. Bad idea. I've seen this in both cPanel and Plesk and I strongly discourage its' use, regardless of the directory structure used. Any clearer?
As said, a Reseller type of control panel account is a much better prospect - in fact, that's how I started in value-add hosting.
However, if you're not interested in a (more) secure environment, don't let me dissuade you.  :-X

Parked domains are, of course, something different.

Offline
***
Re: The big Question
« Reply #7 on: February 13, 2020, 10:55:40 AM »
Now lets say the same user wants to add 10 domains.
Actually, I do know what you are saying and have come across quite a few clients that have used add-on domains, to host multiple customers/websites under their own account. Bad idea. I've seen this in both cPanel and Plesk and I strongly discourage its' use, regardless of the directory structure used. Any clearer?
As said, a Reseller type of control panel account is a much better prospect - in fact, that's how I started in value-add hosting.
However, if you're not interested in a (more) secure environment, don't let me dissuade you.  :-X

Parked domains are, of course, something different.

No you still dont get it.

My users have a user account and they can add 10 of their own domains for personal use.  But their primary domain associated with their account does not have its own folder like all of their other personal domains.

Offline
**
Re: The big Question
« Reply #8 on: February 13, 2020, 11:31:45 AM »
Other control panels i use have the following structure

Home/User/
         Domains/subdomain1/public html/website files
                          /subdomain2/public html/website files

         Public html/primary website files

Much better way than how i recall this panel does it.

So a users p arent domain is separate from addon domains

Offline
***
Re: The big Question
« Reply #9 on: February 14, 2020, 12:45:43 AM »
I havent had cpanel in many years, and they had the same lame structure as CWP.  I guess what I am really asking is "why is the primary domain treated differently than all of the add on domains for any given user."
« Last Edit: February 14, 2020, 12:47:35 AM by pixelpadre »

Offline
****
Re: The big Question
« Reply #10 on: February 14, 2020, 12:59:13 AM »
I don't know what to tell you.  public_html has been around for decades. If you don't like it, your more than welcome to amend  apache/nginx to meet your needs.   Nobody's twisting your arm to use this software.  You could install a simple lamp stack and manage it yourself.  Your using a package software for the ease of configuring your server. Deal with it, stop complaining, or change to a software that suits what you want to happen.
Google Hangouts:  rcschaff82@gmail.com

Re: The big Question
« Reply #11 on: February 14, 2020, 01:01:01 AM »
+1  8)

Offline
***
Re: The big Question
« Reply #12 on: February 14, 2020, 01:07:58 PM »
I don't know what to tell you.  public_html has been around for decades. If you don't like it, your more than welcome to amend  apache/nginx to meet your needs.   Nobody's twisting your arm to use this software.  You could install a simple lamp stack and manage it yourself.  Your using a package software for the ease of configuring your server. Deal with it, stop complaining, or change to a software that suits what you want to happen.

Why cant anyone understand what I am saying. 

I dont have a problem with public_html.  the problem is the default domain goes there instead of public_html/defaultdomain.com/index.html

I dont want any files in /public_html/ I want only other directories in /public_html/
« Last Edit: February 14, 2020, 01:10:19 PM by pixelpadre »

Re: The big Question
« Reply #13 on: February 14, 2020, 01:46:15 PM »
So create a directory and do a redirect - it's what I normally do and is standard fare for many packages.
 :-X :-X

Offline
****
Re: The big Question
« Reply #14 on: February 14, 2020, 02:09:18 PM »
I have told you.  Configure your server the way you want to then.  Your not stating that you want help, you're stating that you want CWP to change the software to suite your needs.

So here, I'm going to help you out:
The Template files cwp uses to build the configs are stored in:
/usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts
httpd = apache w/o php-fpm
httpd/php-fpm = apache w/ php-fpm
httpd/proxy = apache acts as a proxy
nginx = proxy
nginx/php-fpm = nginx standalone

I should note.  If you set it as the standard config, path for subdomains/addon domains will be ignored.

Catching a theme here yet?  NOW.  .tpl files are for port 80.  .stpl files are for  443 ssl.

Now let's put it all together.  let's say we are working with nginx standalone.
We copy nginx/php-fpm/default.stpl to nginx/php-fpm/mydomain.stpl
now we edit the line:  root %docroot%;   and change it to  root /home/%user%/public_html/%domain%;
save the template.
Now log into CWP.  Goto Webserver Settings -> WebServers Main Config
Change the default to your new config you created.
Alternatively, you can use your template on a specific domain only by WebServerDomainConf


I should note.  Setting as the Main Config will ignore the path settings for addon/subdomains.  So when setting path for subdomains, make sure you set them public_html/sub.domain.com
« Last Edit: February 14, 2020, 02:17:13 PM by rcschaff »
Google Hangouts:  rcschaff82@gmail.com