zpanel in port other than 80

Once you installed zpanel, it runs in port 80 by default if you didn’t installed it in sub-domain. This will point your domain to zpanel instead of your application. If you want zpanel and your application co-exist in the same domain without installing zpanel in sub-domain again, then one way around is running the zpanel in port other than 80.

The following configuration is needed in order to enable zpanel in port other than 80. The configuration could be added to httpd.conf file in /etc/httpd/conf/

# Ensure that Apache listens on port 10001
Listen 10001

# Listen for virtual host requests on all IP addresses
NameVirtualHost *:10001

<VirtualHost *:10001>
DocumentRoot /etc/zpanel/panel
ServerName www.mysite.com

# Other directives here
</VirtualHost>

This configuration is useful not only to allow zpanel to run in port mentioned but using this configuration we can host different application in different port.

Understanding group file in Linux

/etc/group is a text file which defines the groups to which users belongs to under Linux and UNIX operating system. There is one entry per line, and each entry is separated by colon(:) symbol. There are total of 4 fields per line.

rootuser:x:513:ujjwal,chris,mas

Now, let’s elaborate the fields for the entries.

  • Group Name: Name of the group.
  • Password: Generally password is not used, hence it is empty/blank. It can store encrypted password. This is useful to implement privileged groups.
  • Group ID: Each user must be assigned a group ID. You can see this number in your /etc/passwd file.
  • Group List: It is a list of user names of users who are members of the group. The user names, must be separated by commas.

Understanding passwd file in Linux

/etc/passwd file in linux is a text file that contains a list of the system’s accounts which is required during login. It contains essential information like user ID, group ID, home directory, shell, etc.

/etc/passwd contains one entry per line for each user (or user account) of the system. All fields are separated by a colon (:) symbol. There are total of seven fields per line.

ujjwal:x:512:513:/var/www/html:/bin/bash:xx

Now, let’s elaborate the fields for the entries

  • Username: Username is needed for user login. It should be between 1 and 32 characters.
  • Password: Password is stored encrypted in /etc/shadow file which is indicated by x character above.
  • User ID (UID): Each user must be assigned a user ID (UID). UID 0 (zero) is reserved for root and UIDs 1-99 are reserved for other predefined accounts. Further UID 100-999 are reserved by system for administrative and system accounts/groups.
  • Group ID (GID): Group ID of a user which is stored in /etc/group file
  • User ID Info: This is the comment field which allows you to add extra information about the users such as user’s full name, phone number etc. This field is used by finger command.
  • Home Directory: The absolute path to the directory the user will be in when they log in. If this directory does not exists then users directory becomes /
  • Command/Shell: The absolute path of a command or shell (/bin/bash). Typically, this is a shell but that does not mean it has to be a shell.
000webhost logo