How to delete sites manually with Ensim Pro (Linux) when normal deletion fails

This solution was given to us by the Ensim staff, as a paid support request. Hopefully, if you’re reading this, you will not have to buy a support ticket:

To delete the sites manually you will have to do the following:

1. Find the siteID.
sitelookup -d domainname
2.cd /etc/virtualhosting/mappings/
grep siteID *
3. Remove the entry from domainmap file and regenerate the domainmap.db using
makemap hash domainmap.db < domainmap
4. cd /home/virtual/
rm -rf siteID/
5. Remove any apache entries.
cd /etc/httpd/conf/
rm -rf siteID siteID.preview
cd virtual
rm -f siteID
cd ../virtual.preview
rm -f siteID
6. Restart httpd.
service httpd restart
7. Remove cron jobs
cd /etc/cron.weekly/
rm -f 0virtualhosting.siteID
cd ../cron.daily/
rm -f 0virtualhosting.siteID

How to fix mod_perl with Apache2 on Ensim 3.7.x and Ensim 4.0.x?

Fixing mod_perl

Based on Ensim Knowledge ID:964

Description:
mod_perl fails with Apache 2.0 on Ensim Pro/Basic

Solution:

When using Apache 2.0 with Ensim Pro/Basic, mod_perl no longer functions.  This is due to improper module references.  Ensim will provide an official fix in an upcoming Erratum.  A symptom of this error will be the following error information in /var/log/httpd/error_log

[Wed May 19 13:42:14 2004] [error] failed to resolve handler `Apache::Registry’
[Wed May 19 13:42:14 2004] [error] [client 67.172.191.228] Can’t locate loadable object for module Apache::Constants in @INC (@INC contains: /usr/lib/perl5/5.8.1/i386-linux-thread-multi /usr/lib/perl5/5.8.1 /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.1/i386-linux-thread-multi /usr/lib/perl5/5.8.1 . /etc/httpd/ /etc/httpd/lib/perl) at /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi/mod_perl.pm line 14
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi/Apache.pm line 6.
BEGIN failed–compilation aborted at /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi/Apache.pm line 6.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi/Apache/Registry.pm line 2.
BEGIN failed–compilation aborted at /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi/Apache/Registry.pm line 2.
Compilation failed in require at (eval 1) line 3.

Applies to:

 

 Products:

 Ensim Pro, Ensim Basic

 

 Versions:

 3.7.x, 4.0

 

 Platforms:

 Red Hat Enterprise, Fedora

Instructions:

mkdir /root/working
cd /root/working
wget 
ftp://ftp.Ensim.com/outgoing/kb/mod_perl/mod_perl.pyc.gz
gunzip mod_perl.pyc.gz
cp /usr/lib/python2.2/site-packages/vh3/modules/mod_perl.pyc /root/working/mod_perl.pyc.backup
cp mod_perl.pyc /usr/lib/python2.2/site-packages/vh3/modules/mod_perl.pyc
service webppliance restart
for i in $(sitelookup -a site_handle); do EditVirtDomain $i; done
rpm -e mod_perl-httpd13


How to look up admin info about a site?

usage: sitelookup [ -w  ] [ -s  ] [ -d  ]

[ -u ] [ -a ]
[ domain,wp_user,site_handle,site_root,site_admin ]

-w:wp_user is the top level unix user (admin1)
-s:site_handle is the site equivalent of wp_user (site1)
-d:domain is the hostname for a site (myco.com)
-u:site_admin is the username for a site (bob)
-a:returns info on all sites

E.g. sitelookup -d domain.com site_handle


How to make a site IP based Solution:

A) Converting a Name-based site to a ip-based site
login as root and run the command:

EditVirtDomain -c ipinfo,namebased=0,nbaddrs=\[\],ipaddrs=\[new_ip_addr\] domain_name
where
new_ip_addr is the new ip address
domain_name is the domain name of the site

e.g. EditVirtDomain -c ipinfo,namebased=0,nbaddrs=\[\],ipaddrs=\[10.5.3.2\] mydomain.com


B) Converting an ip-based site to a Name-based site

login as root and run the command:

EditVirtDomain -c ipinfo,namebased=1,ipadrs=\[\] domain_name
where
domain_name is the domain name of the site

e.g. EditVirtDomain -c ipinfo,namebased=1,ipaddrs=\[\] mydomain.com


Can’t edit PostgreSQL datasource in CFMX

The original URL where we found this solution is here: PostgreSQL DSN Config Bug

Workaround for PostgreSQL DSN Config Bug

How to fix a bug for PostgreSQL Data Source configuration in the ColdFusion MX Administrator.

The problem is that when configuring a PostgreSQL DSN according to the instructions in this TechNote, if you choose a Driver Name field of PostgreSQL, then that will trigger ColdFusion to invoke a handler template of postgresql.cfm. This handler template is defined in the configuration file neo-query.xml in ColdFusion MX’s lib directory. At one time the ColdFusion MX Administrator was going to provide a PostgreSQL JDBC driver out of the box, and that was partially implemented. However, the postgresql.cfm handler file was never implemented or even created. The result is that after first creating the data source when you return to edit it again ColdFusion will recognize the Driver Name of PostgreSQL and attempt to trigger the postgresql.cfmhandler. This causes the error:

"File not found: /CFIDE/administrator/datasources/postgresql.cfm 
The specific sequence of files included or processed is: 
C:\CFusionMX\wwwroot\CFIDE\administrator\datasources\postgresql.cfm "

The author discovered the solution on a CFTALK thread. The solution in the CFTALK thread shows how to change the handler reference from postgresql.cfm to default.cfm. Then restart ColdFusion MX. You will then be able to edit the data source correctly. Click Here for the interactive RoboHelp (Demo).
Pete Freitag pointed out in a comment that a better solution would be to find the default.cfm then make a copy named postgresql.cfm.


Bynari: Configuration files to change

$BYNARI/home/httpd/htdocs/is4web/inc/settings.inc
[line 10] $isHost = '<server>.thenewpush.com';

$BYNARI/home/httpd/htdocs/is4web/xml/config.xml
[replace 10.25.69.250 with correct IP i.e. 10.25.69.232]
...
           <item   option="myhostname" >
                exchange.onethinging.com
           </item>
           <item   option="mydomain" >
                onethinging.com
           </item>
           <item   option="myorigin" >
                $myhostname
           </item>
           <item   option="mydestination" >
                $myhostname,$mydomain
           </item>
           <item   option="mynetworks" >
                10.25.69.0/24
           </item>
           <item   option="inet_interfaces"   hidden="1" >
                $myhostname
           </item>
           <item   option="relay_domains" >
                $mydestination
           </item>
           <item   option="#relayhost" >
           </item>
...
           <item   option="ldapsource_server_host"   hidden="1" >
                10.25.69.232
           </item>
...
           <item   option="Listen" >
                10.25.69.232:80
           </item>
...
           <item   option="LDAPServer"   hidden="1" >
                10.25.69.232
           </item>
...
           
...
           <item   option="SocketBindTight"   hidden="1" >
                on
           </item>
...
           <template   name="proftpd" >
               %3CVirtualHost+exchange.thenewpush.com%3E%0A++DefaultRoot+%2Fhome%2Fftp%0A++%3CDirectory+%2F%2A%3E%0A++++%3CLimit+WRITE%3E%0A++++++DenyAll%0A++++%3C%2FLimit%3E%0A++%3C%2FDirectory%3E%0A++%3CDirectory+%2Fhome%2Fftp%2Ffreebusy%3E%0A++++%3CLimit+READ+WRITE%3E%0A++++++DenyAll%0A++++%3C%2FLimit%3E%0A++++%3CLimit+STOR%3E%0A++++++AllowAll%0A++++%3C%2FLimit%3E%0A%++3C%2FDirectory%3E%0A++Bind+10.25.69.250%0A++Port+21%0A%3C%2FVirtualHost%3E
           </template>
...

$BYNARI/etc/init.d/slapd
[replace 10.25.69.250 with correct IP]
e.g.:
start-stop-daemon --start --pidfile /var/lib/slapd.pid --exec /usr/lib/openldap/slapd -- -h "ldap://10.25.69.250:389/ ldaps://10.25.69.250:636/"
[in vi you would do ":%s/69.250/69.232/g"]

$BYNARI/etc/cyrus.conf
SERVICES {
  imap          cmd="imapd" listen="10.25.69.232:imap2" prefork=0
  pop3          cmd="pop3d" listen="10.25.69.232:pop-3" prefork=0
  imaps         cmd="imapd -s" listen="10.25.69.232:imaps" prefork=0
  pop3s         cmd="pop3d -s" listen="10.25.69.232:pop3s" prefork=0
  sieve         cmd="timsieved" listen="10.25.69.232:sieve" prefork=0
  lmtpunix      cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0
}

$BYNARI/etc/saslauthd.conf
ldap_servers: ldap://10.25.69.232/

$BYNARI/etc/apache/conf/apache.conf
Listen 10.25.69.232:80

$BYNARI/etc/apache/conf/totalapache.conf
<IfModule mod_ssl.c>
Listen 10.25.69.232:443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl
SSLPassPhraseDialog builtin
SSLSessionCache shm:logs/ssl_scache(512000)
SSLSessionCacheTimeout  300
SSLMutex  sem
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLLog      logs/ssl_engine_log
SSLLogLevel info
</IfModule>

$BYNARI/etc/proftpd/proftpd.conf
#DefaultServer on
SocketBindTight on
<VirtualHost exchange.thenewpush.com>
DefaultRoot /home/ftp
<Directory /*>
  <Limit WRITE>
    DenyAll
  </Limit>
</Directory>
<Directory /home/ftp/freebusy>
  <Limit READ WRITE>
    DenyAll
  </Limit>
  <Limit STOR>
    AllowAll
  </Limit>
</Directory>
  Bind 10.25.69.250
  Port 21
</VirtualHost>

$BYNARI/etc/postfix/main.cf
# Generated by Bynari InsightServer 4.0, 03/11/03 14:49:11
# Any changes to this file will be lost
myhostname = exchange.onethinginc.com
mydomain = $myhostname
myorigin = $myhostname
mydestination = $myhostname,$mydomain
mynetworks = $myhostname, 10.25.69.0/24
relay_domains = $mydestination
inet_interfaces = $myhostname
#relayhost =
soft_bounce = yes
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
local_recipient_maps = $alias_maps ldap:ldapsource
#in_flow_delay = 1s
alias_maps = hash:/etc/mail/aliases
alias_database = hash:/etc/mail/aliases
mailbox_transport = cyrus
#fallback_transport =
#luser_relay = manager@thenewpush.com
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
local_destination_concurrency_limit = 5
default_destination_concurrency_limit = 20
debug_peer_level = 2
disable_mime_input_processing = no
disable_mime_output_conversion = no
disable_vrfy_command = yes
mime_boundary_length_limit = 2048
mime_nesting_limit = 20
strict_8bitmime = no
strict_mime_domain_encoding = no
#always_bcc =
#hash_queue_depth = 2
hopcount_limit = 50
max_idle = 100s

max_use = 100
delay_warning_time = 0h
initial_destination_concurrency = 2
#maximal_backoff_time = 4000s
maximal_queue_lifetime = 5d
#minimal_backoff_time = 1000s
#queue_run_delay = 1000s
bounce_size_limit = 50000
#default_process_limit = 50
#fork_attempts = 5
#fork_delay = 1a
#deliver_lock_attempts = 5
#deliver_lock_delay = 1s
#duplicate_filter_limit = 1000
#header_size_limit = 102400
#line_length_limit = 2048
#message_size_limit = 10240000
queue_minfree = 0
transport_retry_time = 60s
#stale_lock_time = 500s
allow_percent_hack = yes
#fallback_relay =
ignore_mx_lookup_error = no
smtp_connect_timeout = 30s
smtpd_timeout = 300s
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/ssl/server.pem
smtpd_tls_key_file = /etc/ssl/server.pem
smtpd_tls_CAfile = /etc/ssl/server.pem
smtpd_use_tls = yes
smtpd_enforce_tls = no
smtpd_tls_cipherlist = DEFAULT
smtpd_starttls_timeout = 300s
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, check_relay_domains
virtual_maps = ldap:ldapsource
ldapsource_server_host = 10.25.69.121
ldapsource_server_port = 389
ldapsource_timeout = 10
ldapsource_query_filter = (|(mailalias=%s)(mail=%s))
ldapsource_result_attribute = mailForward,login
ldapsource_bind = no
#fast_flush*...

 


How to secure web (admin) connections?

To secure admin server connections that are not running on a secure Apache web server, one can use “stunnel”. For example, to secure Sun One ASP, the following command will do it (to be run on the server to secure):

stunnel -D 7 -P/tmp/ -p  /usr/share/ssl/certs/imapd.pem -d 5143 -r localhost:5100

Of course, you may want to use a more appropriate secure cert.


How to upgrade Chili!ASP (SUN One ASP)

The modules need to be recompiled for the new version of Apache. Here are the steps:

  # mkdir -p /opt/casp/module/linux2_optimized/apache_[version]/eapi
  # cd /opt/casp/module/source/build/
  # apxs -c mod_casp2.c
  # cp mod_casp2.so /opt/casp/module/linux2_optimized/apache_[version]/eapi
  # ./configure-server

The initial configuration reports:

 -----------------------------------------------------------------------------
| SERVER CONFIGURATION COMPLETE                                               |
|-----------------------------------------------------------------------------|
|  Your server was successfully configured.  Its information is as follows:   |
| Server installed (asp-server-3000):                                         |
|   Associated Web server conf file: /etc/httpd/conf/httpd.conf               |
|   Associated Web server port: 80                                            |
|   Location: /opt/casp/asp-server-3000                                       |
|   Port: 3000                                                                |
|   Samples: Enabled.                                                         |
|   Documentation: Enabled.                                                   |
|   Automatic ASP start on system boot: Enabled.                              |
|   ASP started: Yes.                                                         |
|   ASP start script: /opt/casp/asp-server-3000/startcaspd                    |
|   ASP stop script: /opt/casp/asp-server-3000/stopcaspd                      |
|   ASP general control script: /opt/casp/asp-server-3000/caspctrl            |
|   Samples URL: http://yggdrasill.thenewpush.com:80/caspsamp                 |
|                                                                             |
 -----------------------------------------------------------------------------