Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - nrozic

Pages: [1]
1
CentOS-WebPanel Bugs / Error while crating new account
« on: May 15, 2015, 08:04:14 AM »
I have noticed that creating new account in CWP is not possible anymore, I always end up with this error:

Code: [Select]
ERROR! Check All Fields (only lower caps are allowed and no special characters)!
Tried to fill all fields with lowercase characters, there was no special characters, I even changed package name to lowercase, but stil getting the same error.

CWP version: 0.9.8.6

Steps to reproduce this error:

  • In CWP (version 0.9.8.6) go to User Accounts -> New Account
  • Fill in new account information
  • Click "Create" button

2
Here is little tip for creating temporary website URL for new accounts that either don't have domain or domain is not fully propagated yet.

To enable this handy feature, you will need to edit Apache vHosts file and edit entry for specific vhost, or edit Apache vHosts template to enable this feature globally for all accounts by adding just one line of code shown below:

Code: [Select]
UserDir /home/*/public_html
Simple as that, but yet very useful because with this feature you can now access website without domain. Site is now accessible via server IP address by providing ~username like this:

Code: [Select]
127.0.0.1/~username
(replace "127.0.0.1" with your real server IP address and "username" with your real username)

Here is working Apache Domain Virtual Host tpl file that I use:

Code: [Select]
# vhost_start %domain_name%
<VirtualHost %domain_ip%:%domain_port%>
ServerName %domain_name%
ServerAlias www.%domain_name%
ServerAdmin %admin_email%
DocumentRoot "%homedir%/%username%/public_html"
UserDir /home/*/public_html
ScriptAlias /cgi-bin/ "%homedir%/%username%/public_html/cgi-bin/"

# Custom settings are loaded below this line (if any exist)
# Include "/usr/local/apache/conf/userdata/%username%/%domain_name%/*.conf

<IfModule mod_suexec.c>
        SuexecUserGroup %username% %username%
</IfModule>

<IfModule mod_suphp.c>
        suPHP_UserGroup %username% %username%
        suPHP_ConfigPath /home/%username%
</IfModule>

<Directory "%homedir%/%username%/public_html">
        AllowOverride All
</Directory>

</VirtualHost>
# vhost_end %domain_name%

Note that mod UserDir needs to be installed and enabled for this.
However, in my case it was already installed and enabled :)

P.S. Maybe this could be included by default in some future CWP version ;)

Pages: [1]