You need to configure virtual hosts for your server.
There should be configuration files in /etc/httpd/conf on RHEL (maybe /etc/apache2 if you have a customized version).
Open httpd.conf and edit the Virtual hosts part, near the bottom.
For instance, you could insert in the file (taken from the link below)
If Apache is listening on port 80 (http, default).
Then you need to restart Apache ( /etc/init.d/httpd restart OR "apache2 restart" )
Please have a look at Apache Virtual hosts
Re: cannot add virtual hosts
If you cannot add virtual hosts, it is unlikely you can change further the apache and system configurations.
The only solutions I see are
Use directly http://testdomain.com/web1 (web2)
If you do not mind using another port (ie not 80), you could install nginx which is pretty simple to configure, and that will accept a custom configuration file, and configure it to accept connections from port 5000 for instance, (eg http://web1.testdomain.com:5000 ), provided that
- RHEL firewall accepts TCP connections from port 5000.
- if you are behind a router / firewall that port 5000 is accepted and routed to that web server
- that web1 / web2 are resolved via DNS, meaning the subdomains are declared and the IP is set to that web server (or router...)
hosts the document files at another web server, and update DNS for testdomain.com
to have the web1/2 subdomains resolving to that new web server IP address