????

Your IP : 3.22.181.81


Current Path : /scripts/
Upload File :
Current File : //scripts/setupwebserverforproxysubdomains

#!/usr/local/cpanel/3rdparty/bin/perl
# cpanel - setupwebserverforservicesubdomains        Copyright 2012 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

use strict;
use warnings;

use Cpanel::Config::Httpd::EA4 ();
use Cpanel::Logger             ();
use Cpanel::Proxy::WebServer   ();

my $logger = Cpanel::Logger->new();

if ( Cpanel::Config::Httpd::EA4::is_ea4() ) {
    $logger->warn("$0 is not part of EasyApache 4, please edit config files as detailed in the EasyApache 4 documentation.");
    exit 1;
}

# Update httpd.conf and template
unless ( Cpanel::Proxy::WebServer::is_setup_webserver_for_proxy_subdomains() ) {
    Cpanel::Proxy::WebServer::setup_webserver_for_proxy_subdomains();
}
exit 0;

__END__

=head1 NAME

setupwebserverforservicesubdomains - Update the webserver configuration to match the current service sub domaisn settings

=head1 SYNOPSIS

setupwebserverforservicesubdomains [options]

    Options:
      --help        Brief help message
      --man         Full help message

=head1 DESCRIPTION

This utility will examine the current cpanel configuration and will
add/remove/update the service subdomains configuration for the web
server to match the configuration

=cut