Hostname and root folder.

Discussion in 'Installation/Configuration' started by cybuch, Sep 22, 2011.

  1. cybuch

    cybuch New Member

    Hello,
    I've got 2 problems and I'm going to start with smaller:
    OpenVZ force hostname of my server, so when i type
    hostname I get e.g. domain and when i type hostname -f I get domain.com. Is it wrong? Tutorial said that both must be the same, so I'm lil bit confused. The OS is Debian 6 and latest version of ISPConfig 3. Second one is problem with vhosts, because the folder of my parked domain e.g. domain.com was just /var/www instead of /var/www/clients/clientX/webX/web.
    Could anyone help me?
    Thanks in advance
     
  2. falko

    falko Super Moderator ISPConfig Developer

    On OpenVZ, the hostname is set on the host, you can control that with vzctl set. But in this case it's no problem if the outputs of the hostname command differ.

    Create a website in ISPConfig, and then move the contents of your website from the /var/www directory to the new document root. You might also have to adjust paths in your web applications.
     
  3. cybuch

    cybuch New Member

    What do you mean with adjusting paths in my web apps? I've created website and it still shown /var/www
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Ensure that you selecetde the correct IP address for the website. the IP address that you select must match the IP address of the dns record of the domain. If the website shall be accessible with www subdomain as well, then enable the auto subdomain www. feature in the website settings.
     
  5. cybuch

    cybuch New Member

    I had selected the correct IP address to the website, the same as DNS IP. I haven't set the www/any other alias. If you want I can make some screenshots for you, just tell me which sections
     
  6. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    ifconfig
    ?
    Can you post one of your vhost configuration files?
     
  7. cybuch

    cybuch New Member

    ifconfig
    Code:
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:4784 errors:0 dropped:0 overruns:0 frame:0
              TX packets:4784 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:1888513 (1.8 MiB)  TX bytes:1888513 (1.8 MiB)
    
    venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
              UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
              RX packets:33220 errors:0 dropped:0 overruns:0 frame:0
              TX packets:32632 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:28710256 (27.3 MiB)  TX bytes:9353597 (8.9 MiB)
    
    venet0:0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
              inet addr:176.9.247.101  P-t-P:176.9.247.101  Bcast:0.0.0.0  Mask:255.255.255.255
              UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
    
    /etc/apache2/sites-available/ispconfig.vhost
    Code:
    ######################################################
    # This virtual host contains the configuration
    # for the ISPConfig controlpanel
    ######################################################
    
     Listen 8080
    NameVirtualHost *:8080
    
    <VirtualHost _default_:8080>
      ServerAdmin [email protected]
    
      <IfModule mod_fcgid.c>
        DocumentRoot /var/www/ispconfig/
        SuexecUserGroup ispconfig ispconfig
        <Directory /var/www/ispconfig/>
          Options Indexes FollowSymLinks MultiViews +ExecCGI
          AllowOverride AuthConfig Indexes Limit Options FileInfo
          AddHandler fcgid-script .php
          FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
          Order allow,deny
          Allow from all
        </Directory>
      </IfModule>
    
      <IfModule mod_php5.c>
        DocumentRoot /usr/local/ispconfig/interface/web/
        AddType application/x-httpd-php .php
        <Directory /usr/local/ispconfig/interface/web>
          Options FollowSymLinks
          AllowOverride None
          Order allow,deny
          Allow from all
              php_value magic_quotes_gpc        0
        </Directory>
      </IfModule>
    
      # ErrorLog /var/log/apache2/error.log
      # CustomLog /var/log/apache2/access.log combined
      ServerSignature Off
    
      <IfModule mod_security2.c>
        SecRuleEngine Off
      </IfModule>
    
      # SSL Configuration
      #SSLEngine On
      #SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt
      #SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key
    
    </VirtualHost>
    
    <Directory /var/www/php-cgi-scripts>
        AllowOverride None
        Order Deny,Allow
        Deny from all
    </Directory>
    
    <Directory /var/www/php-fcgi-scripts>
        AllowOverride None
        Order Deny,Allow
        Deny from all
    </Directory>
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats the wrong vhost. You posted the ispconfig vhost and not the one of the non working website. Plese post zhe vhost file that has the name of the not working website in the file name.
     
  9. cybuch

    cybuch New Member

    I'm sorry for taking your time, but problem is solved (after few reinstalls)
     

Share This Page