Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 27th October 2011, 18:58
dgmufasa dgmufasa is offline
Member
 
Join Date: Oct 2011
Posts: 86
Thanks: 5
Thanked 1 Time in 1 Post
Default adding alias to apache_directive

Hello all,

Was following the information in this thread:
http://www.howtoforge.com/forums/sho...ht=system_user

and trying to make change to the apache_directive so that it will support an alias. When using the item below, it totally destroys the nameserver and I have to remove the zone by hand or else nothing will come up.

Does anyone out there know how to change the item below so that it will be peacefully accepted as a good apache_directive?

TIA

$alias_direct =
"<Alias > /images/ /var/www/clients/client$client_id/web$domain_id/$myusername"."depo/". "</Alias>" . chr(10);
Reply With Quote
Sponsored Links
  #2  
Old 27th October 2011, 22:14
dgmufasa dgmufasa is offline
Member
 
Join Date: Oct 2011
Posts: 86
Thanks: 5
Thanked 1 Time in 1 Post
 
Default ISPConfig 3: ok, now this looks like a bug ...

Hello all,

I have been trying to use : sites_web_domain_update to change the field "apache_directives".

From what I can see, the DB (table web_domain) values get updated correctly, I get no error messages (in fact, the function reports that 1 row has been altered)

- but -

the vhost file for the zone (in my case, foofoo.com.vhost) *never* gets any changes - at all.

So, then the server does not run as expected

Below is the code being used.

Can someone toss a hint this way as to what might be wrong? It looks like a bug to me ..

TIA


PHP Code:
    public function __sitemodifywebdomain($inrecserverid$inrecclientid
    
$indomainid$indomname,  $inlogonid )
    {
        try {
            if (
$inrecclientid <= ) { die("=> siteaddwebdomain: For $indomname Invalid client passed: $inrecclientid <br /> "); }
            
$affected_rows = -999999;
                
            if  ( !( 
$inrecclientid and $inrecclientid 9999 ) ) {
                die(
"=> ERROR: Invalid client id: $inrecclientid was passed into sitemodifywebdomain function. Check the system");
            }

            
$client_id     $inrecclientid;
            
$domain_id     $indomainid;
            
$myusername $inlogonid;
                
            if(
$session_id $this -> ispclient->login($this -> ispcusername,
            
$this -> ispcpassword)) {
                echo 
'<br />Logged successfull. Session ID:'.$session_id.'<br />';
            }
            
            
//* Get the web domain record
            
$domain_record $this -> ispclient ->sites_web_domain_get($session_id$domain_id);

            
/**
            $alias_direct = 
            "<Alias >" . chr(10) . 
            "/images/ /var/www/clients/client$client_id/web$domain_id/$myusername"."depo/". chr(10) . 
            "</Alias>" . chr(10);
        **/    
    
        
            
            
$dirctory_direct_one =  
            
"<Directory /var/www/clients/client" $client_id"/web" $domain_id "/" $myusername chr(10) .
            
"Options FollowSymLinks" chr(10) .
            
"AllowOverride All" chr(10) .
            
"Order allow,deny" chr(10) .
            
"Allow from all" chr (10) .
            
"</Directory>";
            
            
$dirctory_direct =  
            
"<Directory /var/www/web#/web>" chr(10) . 
            
"Options FollowSymLinks" chr(10) .
            
"AllowOverride All" chr(10) .
            
"Order allow,deny" chr(10) .
            
"Allow from all" chr (10) .
            
"</Directory>";
            
            
$apache_direct $dirctory_direct $dirctory_direct_one;
            

            
//* Change parameters
            
$domain_record['apache_directives'] = $apache_direct;
            
print_r($domain_record);

            
$affected_rows $this -> ispclient ->sites_web_domain_update($session_id$client_id$domain_id$domain_record);

            echo 
"Number of records that have been changed in the database: ".$affected_rows."<br>";

            if(
$this -> ispclient ->logout($session_id)) {
                echo 
'Logged out.<br />';
            }

        } catch (
SoapFault $e) {
            echo 
$this -> ispclient ->__getLastResponse();
            die(
'SOAP Error: '.$e->getMessage());
        }
    } 
Forgot to add that when doing a "print_r", I get the following and "web_domain-apache_directives" has the correct information ..

[domain_id] => 72
[sys_userid] => 119
[sys_groupid] => 119
[sys_perm_user] => riud
[sys_perm_group] => ru
[sys_perm_other] =>
[server_id] => 1
[ip_address] => *
[domain] => foofoo.com
[type] => vhost
[parent_domain_id] => 0
[vhost_type] => name
[document_root] => /var/www/clients/client118/web72
[system_user] => web72
[system_group] => client118
[hd_quota] => -1
[traffic_quota] => -1
[cgi] => y
[ssi] => y
[suexec] => y
[errordocs] => 1
[is_subdomainwww] => 1
[subdomain] => www
[php] => mod
[ruby] => y
[redirect_type] => no
[redirect_path] =>
[ssl] => n
[ssl_state] =>
[ssl_locality] =>
[ssl_organisation] =>
[ssl_organisation_unit] =>
[ssl_country] =>
[ssl_domain] =>
[ssl_request] =>
[ssl_cert] =>
[ssl_bundle] =>
[ssl_action] =>
[stats_password] =>
[stats_type] => webalizer
[allow_override] => All
[apache_directives] => <Directory /var/www/web#/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory><Directory /var/www/clients/client118/web72/a000123mdepo
Options FollowSymLinks
AllowOverride All
Order

Last edited by dgmufasa; 27th October 2011 at 22:19.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix delivery problem erebus Installation/Configuration 8 29th July 2014 20:17
Adding a sub domain or an alias domain biggdog Installation/Configuration 5 21st November 2010 01:33
post fix error after a year aberrio Server Operation 5 5th May 2009 21:33
Strato Server - Restoring with SystemImager popper2001 HOWTO-Related Questions 5 28th July 2007 10:18
Creating image with Systemimager cuongtim HOWTO-Related Questions 3 18th November 2006 13:55


All times are GMT +2. The time now is 02:40.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.