HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Change document root for a single website to accomodate Zend Framework (http://www.howtoforge.com/forums/showthread.php?t=48279)

chillifire 26th August 2010 03:19

Change document root for a single website to accomodate Zend Framework
 
Hi,

I am using ISPConfig to host my website www.chillifre.net and related sites news.chillifire.net and support.chillifire.net. The website www.chillifire.net is making use of the Zend Framework and thus needs a document root of /var/www/www.chillifire.net/web/public in stead of the usual /var/www/www.chillifire.net/web I cannot make an overall and generic change as the two other sites are based on opensource packages that do not use Zend Framework and thus have to point to the normal /var/www/xxx/web document root. Currently I have to manually alter the configured file which only works until the next change of configuration 9as it is then of course overwritten.

PS: Others may be interested in how the set up for Zend Framework on ISPConfig3 works - a lot of other add-on directives are required to make this work. Happy to post it on this forum once this document root issue has been resolved.

till 26th August 2010 09:02

The zend framework should work fine with the directory /var/www/www.chillifire.net/web as well. So there is no need to change a directory path in the vhost and you can not change the path.

4F2E4A2E 4th March 2011 11:16

change document root of any hosted web
 
i did currently install redmine with ispconfig 3 and just one left problem over:
i know i should not edit the vhost manually if i am using ispconfig but only this way it is working:
Code:

<Directory /home/www/xxx.com>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost *:80>
      DocumentRoot /home/www/xxx.com/web/redmine/public

    ServerName xxx.com
    ServerAlias *.xxx.com
    ServerAdmin webmaster@xxx.com

    ErrorLog /var/log/ispconfig/httpd/xxx.com/error.log


    <Directory /home/www/xxx.com/web/redmine/public>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /home/www/clients/client4/web38/web/redmine/public>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

    <IfModule mod_ruby.c>
      <Directory /home/www/clients/client4/web38/web/redmine/public>
        Options +ExecCGI
      </Directory>
      RubyRequire apache/ruby-run
      #RubySafeLevel 0
      <Files *.rb>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      </Files>
      <Files *.rbx>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      </Files>
    </IfModule>
<Directory /home/www/xxx.com/web/redmine/public>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /home/www/php-fcgi-scripts/web38/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
        <Directory /home/www/clients/client4/web38/web/redmine/public>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /home/www/php-fcgi-scripts/web38/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

</VirtualHost>

after a time ispconfig alters it again back to:
Code:

<Directory /home/www/xxx.com>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost *:80>
      DocumentRoot /home/www/xxx.com/web

    ServerName xxx.com
    ServerAlias *.xxx.com
    ServerAdmin webmaster@xxx.com

    ErrorLog /var/log/ispconfig/httpd/xxx.com/error.log


    <Directory /home/www/xxx.com/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /home/www/clients/client4/web38/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

    <IfModule mod_ruby.c>
      <Directory /home/www/clients/client4/web38/web>
        Options +ExecCGI
      </Directory>
      RubyRequire apache/ruby-run
      #RubySafeLevel 0
      <Files *.rb>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      </Files>
      <Files *.rbx>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      </Files>
    </IfModule>
<Directory /home/www/xxx.com/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /home/www/php-fcgi-scripts/web38/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
        <Directory /home/www/clients/client4/web38/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /home/www/php-fcgi-scripts/web38/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

</VirtualHost>

how can i set this in ispconfig?

ispconfig settings:
PHP open_basedir:
/home/www/clients/client4/web38/web/redmine/public:/home/www/clients/client4/web38/tmp:/home/www/xxx.com/web/redmine/public:/srv/www/xxx.com/web/redmine/public:/usr/share/php5:/tmp:/usr/share/phpmyadmin

please help

till 4th March 2011 12:21

Reinstall redmine so that it is installed in the web folder and not in web/redmine/public_html/

4F2E4A2E 4th March 2011 13:30

/
 
i need it on xxx.com/

and not on anythings else after it.
a new install would mean xxx.com/[X]

i can't tell ispconfig either to use something _instead_ of web like:
/home/www/xxx.com/web /home/www/xxx.com/X

because then i would take redmine up and public would be the _public_ folder like:
/home/www/xxx.com/public

till 4th March 2011 13:59

According to your vhost file changes, you simply installed redmine in a wrong folder. So the fix is not to change the vhost file, the fix is to install redmine into the correct folder.

Quote:

and not on anythings else after it.
a new install would mean xxx.com/[X]
Thats clear of course and the changes that I proposed does not mean that you have to use a different URL.

4F2E4A2E 4th March 2011 14:29

shure
 
shure i know that, but it's redmine and not wordpress.
i can't just "install" it
and it is not thought to change the "public" folder of redmine.

i mean is it not possible with ispconfig?

till 4th March 2011 14:33

Then you can only create a vhost file manually and place it in the sites-enabled folder and disable the site in ispconfig.

I know a lot of commercial and open source cms ystems from small systems to enterprise wide installs and never seen one that has no configuration option for the path. You might want to contact the developers of the cms and ask them where to change the path, as I cant believe that such a path is hardcoded.

eponymous 14th March 2011 06:43

solution
 
1 Attachment(s)
I'm using the Zend framework, and I just added the apache 'DocumentRoot' directive to make the website load the 'public' directory of my site, instead of the default 'web' directory.

just select the site, then choose options, then in the Apache Directives box type
Code:

DocumentRoot "/the/absolute/path/of/the/directory/"
Using ISPConfig Version: 3.0.3.2

see the screenshot attached.

lovendo 17th January 2014 13:37

Hi,

I know this post is quite old ...

Anyway, is the only valuable solution I found.

So the question goes to eponymous: did that actually work?

Because that Apache Directive didn't work for me.

** FUCK YEAH, IT WORKED **

Here is what I was doing wrong:

I was using << DocumentRoot "/var/www/www.example.com/web/public_html/" >> instead of << DocumentRoot "/var/www/clients/clientX/webX/web/public_html/" >>

Even if /var/www/www.example.com is a symbolic link to /var/www/clients/clientX/webX, it has to be used the second way.

Problem solved, let's go for the next one.


All times are GMT +2. The time now is 16:42.

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