Publishing a Zend project in a subdomain of my website

Discussion in 'General' started by vaio1, May 12, 2010.

  1. vaio1

    vaio1 Member

    Hi guys,

    how have I publish a Zend project in a subdomain of my website using ISPConfig?

    I have read that I cannot edit the Vhost file, so how have I do?

    thanks
     
  2. vaio1

    vaio1 Member

    Any idea guys?!
    I need to create a virtual host for my Zend project but it is not possible, so how have I do?

    This is the VirtualHost created for managing the Zend project:

    Code:
    <VirtualHost *:80>
            ServerAdmin webmaster@localhost
            DocumentRoot /var/www/myzendproject/public
            ServerName www.myzendproject.com
    
            <Directory /var/www/myzendproject/public>
                DirectoryIndex index.php
                AllowOverride All
                Order allow,deny
                Allow from all
            </Directory>
    </VirtualHost>
    
    
    how have I use ISPConfig in order to create this VirtualHost?

    Thanks
     
  3. falko

    falko Super Moderator Howtoforge Staff

    You can use the Apache Directives field to add custom directives to the vhost.
     
  4. vaio1

    vaio1 Member

    Hi Falko,

    thanks for your reply. I don't understand how have I do.
    What have I write in that textarea?

    thanks
     
  5. falko

    falko Super Moderator Howtoforge Staff

    I think all you have to do is add
    Code:
    <Directory /var/www/myzendproject/public>
                DirectoryIndex index.php
                AllowOverride All
                Order allow,deny
                Allow from all
    </Directory>
    to your Apache Directives field. Please make sure you use the correct path.
     
  6. vaio1

    vaio1 Member

    hi falko,

    I have seen already a <directory> structure inside the VirtualHost section. Can two blocks live together?

    Code:
    <Directory /var/www/web63/web/>
            AllowOverride All
    </Directory>
    
    <Directory /var/www/web63/web/myproject/public>
                DirectoryIndex index.php
                AllowOverride All
                Order allow,deny
                Allow from all
    </Directory>
    
    RewriteCond %{HTTP_HOST}   ^myproject\.mysite\.biz [NC]
    RewriteRule ^/(.*)         http://www.mysite.biz/myproject/public/$1 [L]
    
    
    I get this error:
    Code:
    [Thu May 27 18:10:10 2010] [error] [client 95.148.233.239] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    
    If I delete these two rows the webserver redirect me inside the folder specified. I need to maintain a clean URL.
    Code:
    RewriteCond %{HTTP_HOST}   ^myproject\.mysite\.biz [NC]
    RewriteRule ^/(.*)         http://www.mysite.biz/myproject/public/$1 [L]
    
    Inside the ISPConfig Panel I have set a Co-Domain WITHOUT forward url for the domain mysite.biz.

    What have I do?

    thanks
     
    Last edited: May 27, 2010
  7. falko

    falko Super Moderator Howtoforge Staff

    Yes.
    Are there any other rewrite rules in the vhost configuration or in a .htaccess file?
     
  8. vaio1

    vaio1 Member

    yes they are!

    Code:
    
    <Directory /var/www/web2/web/>
            AllowOverride All
    </Directory>
    
    # enable Compression
    AddOutputFilterByType DEFLATE text/html text/plain text/xml 
    
    # enable expirations
    ExpiresActive Off
    
    
    RewriteCond %{HTTP_HOST}   ^webpanel\.mysite\.com [NC]
    RewriteRule ^/(.*)         http://www.mysite.com:81/$1 [L]
    
    RewriteCond %{REQUEST_URI} !index\.php
    RewriteCond %{HTTP_HOST} ^myproject\.mysite\.com [NC]
    RewriteRule ^/(.*) http://www.mysite.com/myproject/public/$1 [L]
    
    RewriteCond %{HTTP_HOST}   ^webmail\.mysite\.com [NC]
    RewriteRule ^/(.*)         http://www.mysite.com/others/webmail/$1 [L]
    
    
    # tail /var/www/web2/log/error.log 
    [Sun Jun 13 11:47:29 2010] [debug] core.c(3054): [client 95.245.233.254] redirected from r->uri = /others/myproject/public/index.php, referer: http://myproject.mysite.com/
    [Sun Jun 13 11:47:29 2010] [debug] core.c(3054): [client 95.245.233.254] redirected from r->uri = /others/myproject/public/index.php, referer: http://myproject.mysite.com/
    [Sun Jun 13 11:47:29 2010] [debug] core.c(3054): [client 95.245.233.254] redirected from r->uri = /others/myproject/public/index.php, referer: http://myproject.mysite.com/
    [Sun Jun 13 11:47:29 2010] [debug] core.c(3054): [client 95.245.233.254] redirected from r->uri = /others/myproject/public/index.php, referer: http://myproject.mysite.com/
    [Sun Jun 13 11:47:29 2010] [debug] core.c(3054): [client 95.245.233.254] redirected from r->uri = /domains, referer: http://myproject.mysite.com/
    [Sun Jun 13 11:47:29 2010] [debug] mod_deflate.c(619): [client 95.245.233.254] Zlib: Compressed 770 to 435 : URL /others/myproject/public/index.php, referer: http://myproject.mysite.com/
    [Sun Jun 13 11:47:36 2010] [debug] mod_deflate.c(619): [client 66.249.65.177] Zlib: Compressed 54299 to 10072 : URL /index.php
    [Sun Jun 13 11:47:39 2010] [debug] mod_deflate.c(619): [client 66.249.65.146] Zlib: Compressed 0 to 2 : URL /index.php
    [Sun Jun 13 11:47:39 2010] [debug] mod_deflate.c(619): [client 66.249.65.146] Zlib: Compressed 20452 to 6144 : URL /index.php/Pagina_principale
    [Sun Jun 13 11:47:40 2010] [debug] mod_deflate.c(619): [client 66.249.65.146] Zlib: Compressed 13051 to 3732 : URL /index.php
    
     

Share This Page