how to restart ispc3 service

Discussion in 'General' started by radim_h, Mar 23, 2009.

  1. radim_h

    radim_h Member

    Hello guys,

    i have simple question, how should i restart ispconfi3 service as there is nothing as /etc/init.d/ispc*
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig 3 has no service, so you cant restart it and there is no ned to restart it.
     
  3. Polk

    Polk New Member HowtoForge Supporter

    In other words, what you need is to restart Apache2.

    Code:
    /etc/init.d/apache2 restart
    that will restart all web applications on your server.
     
  4. radim_h

    radim_h Member

    thanks for explaining, guys .o)
     
  5. HellMind

    HellMind New Member

    but this isn't 100% truth

    I ve modified my .vhost from apache2

    Restarted apache2 and works fine

    But, if I reboot, ispc restore the .vhost file

    Why?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    1) Which ispconfig version?
    2) Which vhsot file is restored?
    3) What did you change in this vhost file?
     
  7. HellMind

    HellMind New Member

    1
    3.0.0.0 RC2 (I updated to .1 I will try again);​
    2
    Any one that I modified /etc/apache2/sites-available/*.vhost​
    3
    AllowOverride to all
    and some fix of
    rewrite redirects
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    1) Yes, please update to the öatest release.
    2) ISPconfig 3 updates a site only when you change something in the ispconfig interface and not when the server is rebooted. You can verify that by enableing debugging in /usr/local/ispconfig/server/lib/config.inc.php and then check the monitoring module after a reboot. If ISPConfig updates your sites then there will be a lot of lines which describe the update process for every website in detail.
    3) The vhosts files should never be modified manually. Either you edit the master template that is used to create the files or you add your modifications to the apache directives field of the website.
     
  9. HellMind

    HellMind New Member

    3) The vhosts files should never be modified manually. Either you edit the master template that is used to create the files or you add your modifications to the apache directives field of the website.
    -
    1.- I need to fix a redirect problem, dunno why but one site add the rewrite directive to another file, :
    If you add www redirect of a A domain
    It changes the B.vhost file :S

    Also I need to add "allowoveride all"

    Where are the apaches directives to do this?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Not on my servers. Turn on debugging if you want to check this on your server, but I'am 100% sure that only the vhost is changed were the domain belongs to.

    Last tab in the website settings.
     
  11. HellMind

    HellMind New Member

    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.
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    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.
     
  13. HellMind

    HellMind New Member

    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: Mar 26, 2009
  14. HellMind

    HellMind New Member

    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
     
  15. HellMind

    HellMind New Member

    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
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    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
     
  17. HellMind

    HellMind New Member

    That rewrites rules are from the alias domain
    c & b -> www.a

    the one missing is the
    auto www
    a -> a.www
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    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]
     
  19. HellMind

    HellMind New Member


    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)
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

Share This Page