Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 26th March 2009, 19:06
HellMind HellMind is offline
Member
 
Join Date: Jul 2008
Posts: 99
Thanks: 4
Thanked 1 Time in 1 Post
Send a message via ICQ to HellMind Send a message via MSN to HellMind
Default

When I modified a.com.ar domain option it modifies the B one
I just added the www. redirection of a.com.ar, here is the log



2009-03-26 15:01 ispconfig Debug Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
2009-03-26 15:01 ispconfig Debug No Updated records found, starting only the core.
2009-03-26 15:01 ispconfig Debug Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
2009-03-26 15:01 ispconfig Debug Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
2009-03-26 15:01 ispconfig Debug Call function 'restartHttpd' in module 'web_module'.
2009-03-26 15:01 ispconfig Debug Processed datalog_id 609
2009-03-26 15:01 ispconfig Debug Writing the vhost file: /etc/apache2/sites-available/b.com.vhost
2009-03-26 15:01 ispconfig Debug Add server alias: a.com.ar
2009-03-26 15:01 ispconfig Debug Add server alias: b.com
2009-03-26 15:01 ispconfig Debug Disable SSL for: b.com
2009-03-26 15:01 ispconfig Debug Call function 'update' in plugin 'apache2_plugin' raised by event 'web_domain_update'.
2009-03-26 15:01 ispconfig Debug Call function 'ssl' in plugin 'apache2_plugin' raised by event 'web_domain_update'.
2009-03-26 15:01 ispconfig Debug There is already a lockfile set. Waiting another 10 seconds...
2009-03-26 15:01 ispconfig Debug There is already a lockfile set. Waiting another 10 seconds...
2009-03-26 15:00 ispconfig Debug Found 1 changes, starting update process.
Reply With Quote
Sponsored Links
  #12  
Old 26th March 2009, 19:09
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,777
Thanks: 821
Thanked 5,332 Times in 4,184 Posts
Default

Thats all pretty fine. You forgot to mention that a.com and b.com are not two independant websites. A.com is a alias or subdomain of b.com, so ISPconfig has to modify b.com as a aliases of vhostsvare defined in the same vhost file of course.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #13  
Old 26th March 2009, 19:32
HellMind HellMind is offline
Member
 
Join Date: Jul 2008
Posts: 99
Thanks: 4
Thanked 1 Time in 1 Post
Send a message via ICQ to HellMind Send a message via MSN to HellMind
Default

Quote:
Originally Posted by till View Post
Thats all pretty fine. You forgot to mention that a.com and b.com are not two independant websites. A.com is a alias or subdomain of b.com, so ISPconfig has to modify b.com as a aliases of vhostsvare defined in the same vhost file of course.
There was a problem there, I fixed it, but leave that.

Now the obvious problem is

The Auto-Subdomain www
Isn't work
It doesn't add the redirect rule to vhost file

2009-03-26 15:27 ispconfig Debug Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
2009-03-26 15:27 ispconfig Debug Call function 'restartHttpd' in module 'web_module'.
2009-03-26 15:27 ispconfig Debug Processed datalog_id 620
2009-03-26 15:27 ispconfig Debug Writing the vhost file: /etc/apache2/sites-available/a.vhost
2009-03-26 15:27 ispconfig Debug Add server alias: c
2009-03-26 15:27 ispconfig Debug Add server alias: b
2009-03-26 15:27 ispconfig Debug Disable SSL for: a
2009-03-26 15:27 ispconfig Debug Call function 'update' in plugin 'apache2_plugin' raised by event 'web_domain_update'.
2009-03-26 15:27 ispconfig Debug Call function 'ssl' in plugin 'apache2_plugin' raised by event 'web_domain_update'.
2009-03-26 15:27 ispconfig Debug Found 1 changes, starting update process.
2009-03-26 15:27 ispconfig Debug Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock

a.vhost

Code:
<Directory /var/www/a>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost *:80>
      DocumentRoot /var/www/a/web

    ServerName a
    ServerAlias www.a www.b b www.c c
    ServerAdmin webmaster@a

    ErrorLog /var/log/ispconfig/httpd/a/error.log

    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 503 /error/503.html

    <Directory /var/www/a/web>
        Options FollowSymLinks
        AllowOverride Indexes AuthConfig Limit
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/clients/client1/web1/web>
        Options FollowSymLinks
        AllowOverride Indexes AuthConfig Limit
        Order allow,deny
        Allow from all
    </Directory>

    # mod_php enabled
    AddType application/x-httpd-php .php .php3 .php4 .php5
        php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@a"
    php_admin_value upload_tmp_dir /var/clients/client1/web1/tmp
    php_admin_value session.save_path /var/clients/client1/web1/tmp
    #php_admin_value open_basedir /var/clients/client1/web1:/usr/share/php5

    RewriteEngine on
    RewriteCond %{HTTP_HOST}   ^b [NC]
    RewriteRule   ^/(.*)$ http://www.a/$1  [L]
    RewriteCond %{HTTP_HOST}   ^www.b [NC]
    RewriteRule   ^/(.*)$ http://www.a/$1  [L]
    RewriteCond %{HTTP_HOST}   ^c [NC]
    RewriteRule   ^/(.*)$ http://www.a/$1  [L]
    RewriteCond %{HTTP_HOST}   ^www.c [NC]
    RewriteRule   ^/(.*)$ http://www.a/$1  [L]
</VirtualHost>
As you see there is not the a -> www.a rule

Last edited by HellMind; 26th March 2009 at 19:42.
Reply With Quote
  #14  
Old 26th March 2009, 20:25
HellMind HellMind is offline
Member
 
Join Date: Jul 2008
Posts: 99
Thanks: 4
Thanked 1 Time in 1 Post
Send a message via ICQ to HellMind Send a message via MSN to HellMind
Default

I also tried adding the apache directives

I added

<Directory /var/www/x.com/web/>
Options +Includes +FollowSymlinks -Indexes
AllowOverride All
Order allow,deny
Allow from all
<Files ~ "^.ht">
Deny from all
</Files>
</Directory>

But my site still hasn't permission for .htaccess

its a drupal
Reply With Quote
  #15  
Old 26th March 2009, 21:29
HellMind HellMind is offline
Member
 
Join Date: Jul 2008
Posts: 99
Thanks: 4
Thanked 1 Time in 1 Post
Send a message via ICQ to HellMind Send a message via MSN to HellMind
Default

the apache directives works

what happened

If you add something illegal to there, then apache doesn't restart (when you click save) so you cant see the changes or errors.

If you restart apache manually it will nost start and it will stop all the apache daemon including the ispconfig admin httpd

So editing those directives can be dangerous.
--

the auto www redirect isn't work yet
Reply With Quote
  #16  
Old 26th March 2009, 21:40
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,777
Thanks: 821
Thanked 5,332 Times in 4,184 Posts
Default

Rewriting rules are inserted all correctly as you can see in your vhost:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^b [NC]
RewriteRule ^/(.*)$ http://www.a/$1 [L]
RewriteCond %{HTTP_HOST} ^www.b [NC]
RewriteRule ^/(.*)$ http://www.a/$1 [L]
RewriteCond %{HTTP_HOST} ^c [NC]
RewriteRule ^/(.*)$ http://www.a/$1 [L]
RewriteCond %{HTTP_HOST} ^www.c [NC]
RewriteRule ^/(.*)$ http://www.a/$1 [L]

If they work or not depends on the domains you insert etc. For details on rewrite rules and how they work take a look here:

http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #17  
Old 26th March 2009, 21:43
HellMind HellMind is offline
Member
 
Join Date: Jul 2008
Posts: 99
Thanks: 4
Thanked 1 Time in 1 Post
Send a message via ICQ to HellMind Send a message via MSN to HellMind
Default

Quote:
Originally Posted by till View Post
Rewriting rules are inserted all correctly as you can see in your vhost:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^b [NC]
RewriteRule ^/(.*)$ http://www.a/$1 [L]
RewriteCond %{HTTP_HOST} ^www.b [NC]
RewriteRule ^/(.*)$ http://www.a/$1 [L]
RewriteCond %{HTTP_HOST} ^c [NC]
RewriteRule ^/(.*)$ http://www.a/$1 [L]
RewriteCond %{HTTP_HOST} ^www.c [NC]
RewriteRule ^/(.*)$ http://www.a/$1 [L]

If they work or not depends on the domains you insert etc. For details on rewrite rules and how they work take a look here:

http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
That rewrites rules are from the alias domain
c & b -> www.a

the one missing is the
auto www
a -> a.www
Reply With Quote
  #18  
Old 26th March 2009, 21:51
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,777
Thanks: 821
Thanked 5,332 Times in 4,184 Posts
Default

On my test server the redirect rule for the www of the main domain gets added too correctly, so there is no problem with ISPConfig. Maybe you edited something in your setup that causes this.

main domain: test.int with auto www enabled produce sthe rewrite rules:

RewriteCond %{HTTP_HOST} ^test.int [NC]
RewriteRule ^/(.*)$ http://test.com$1 [R]
RewriteCond %{HTTP_HOST} ^www.test.int [NC]
RewriteRule ^/(.*)$ http://test.com$1 [R]
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #19  
Old 26th March 2009, 21:53
HellMind HellMind is offline
Member
 
Join Date: Jul 2008
Posts: 99
Thanks: 4
Thanked 1 Time in 1 Post
Send a message via ICQ to HellMind Send a message via MSN to HellMind
Default

Quote:
Originally Posted by till View Post
On my test server the redirect rule for the www of the main domain gets added too correctly, so there is no problem with ISPConfig. Maybe you edited something in your setup that causes this.

main domain: test.int with auto www enabled produce sthe rewrite rules:

RewriteCond %{HTTP_HOST} ^test.int [NC]
RewriteRule ^/(.*)$ http://test.com$1 [R]
RewriteCond %{HTTP_HOST} ^www.test.int [NC]
RewriteRule ^/(.*)$ http://test.com$1 [R]

I think yours also are wrong

going to

http://test.int/hello

you will be redirected to

http://test.comhello

(I had this problem too, when www. auto redirect was working)
Reply With Quote
  #20  
Old 26th March 2009, 22:00
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,777
Thanks: 821
Thanked 5,332 Times in 4,184 Posts
 
Default

Mine was just an example. If you add a / at the end then its http://test.com/hello
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
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
Monit on Debian Hans Tips/Tricks/Mods 2 6th October 2008 13:53
add web site serr57 Installation/Configuration 18 13th April 2008 11:40
dns server error Hellbound General 7 2nd August 2007 09:18
ISP Services wouldn't restart any service, possibly Domain Host configuration issue. Kamran Shah Installation/Configuration 20 17th August 2006 17:33
UebiMiau login puntjuh Installation/Configuration 13 14th March 2006 18:24


All times are GMT +2. The time now is 06:25.


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