System Admin - Apache CentOS 7 Cpanel to CWP7 Conversion -Need perl script to run under server wide directory with suexec recompiled/configured

Job ID: 30895398

Budget: $10 – $30 USD

PROJECT REQUIREMENTS

To reconfigure / recompile of necessary Apach 2.4 to work in the CWP7 control panel environment to behave the same as our current production server in Cpanel.

Must be able to have Server wide scripts work from a Server Wide Directory, while maintaining the User writing permission the same as the Cpanel Server.

Cpanel uses EasyApache4 to compile the apache with the correct modules through a user interface. CWP7 running on Centos does not have this ability.

I imagine it will be possible to create a matching configuration of the build to have the behaviors perform the same way.


1. Current apache has ability to list files with the ~account usage

ie;
http://netstores.com/~felixhob/felixhobbyshop/images/

This has been accomplished by adding the cpanel configuration to:

## as a test for configuration matching CPanel by Adam 7/17
## This works exactly the same now as Cpaenl
# Required cPanel security policy: disable userdir when mod_ruid2 or mpm_itk or mod_passenger are loaded
<IfModule userdir_module>
UserDir public_html

<IfModule ruid2_module>
UserDir disabled
</IfModule>
<IfModule mpm_itk.c>
UserDir disabled
</IfModule>
<IfModule mod_passenger.c>
UserDir disabled
</IfModule>
</IfModule>

And

2. Be able to run a system wide script under there Virtual Host User Id in a Hidden Server Wide Directory.

See working Cpanel script output from call to test.pl
http://www5.netstores.com/dwos-bin/test.pl

/usr/local/apache/netstores/dwos-bin

from
/usr/local/cpanel/cgi-sys/netstores/data

ie: ls -tal
drwxr-xr-x 7 pos2net pos2net 4096 Jul 15 01:30 maudeboutique
drwxr-xr-x 8 felixhob felixhob 4096 Jul 15 01:29 felixhobbyshop
drwxr-xr-x 7 netstest netstest 4096 Jul 15 01:29 GrandBazar

notice each data directory has its unique user id ownership.

The current scripts run under a renamed script bin

/usr/local/cpanel/cgi-sys/netstores/dwos-bin
-r-xr-xr-x 1 root wheel 10337 Jul 13 08:00 proc_srch.pl

so under directory that is hidden from users

/var/www/NetStores
Where each subdirectory is the entire Perl Application running System wide
and the 2 scripting directorys
/usr/local/cpanel/cgi-sys/netstores/dwos-bin
/usr/local/cpanel/cgi-sys/netstores/dwos-bin_test

Can be run under diferrent virtual hosts ids.
Currently under Cpanel Apache they user is root group wheel


3. Will not destroy CWP7 create new account, Add Server DNS/Apache configuration system.

Also if the apache needs to recompiled complete directions for me to administer in future. Could be new Virtual Host template structure

Problem
Server Wide Script Locations not Working

They can only work in a scripting directory under their own user id due to suexec configuration and suexec binary.

We have been using apache2 on Centos and cpanel for over 10 years.

On cpanel Centos Servers, there are system wide scripts located in

/usr/local/cpanel/cgi-sys/

We are able to place a directory of scripts and data in those directories, and run them system wide on any virtual host in the server using apache2.

Inside the cgi-sys directory are cgi scripts for cpanel that do redirections.

We are able to put our script aliases in those directories, and call them with a script alias in httpd.conf. ie: ScriptAlias /dwos-bin/ /usr/local/cpanel/cgi-sys/netstores/dwos-bin
Related categories: Perl Linux Apache Shell Script CentOs