PDA

View Full Version : where is the home directory for vhosts


gilas
14th March 2007, 14:47
Hi folks,
I used ISPConfig since 2.2.4 and now I installed the last version in a new server.

The vhosts home directory for the Older version is /home/www/<host-names>/web

now the latest version point to:

/var/www/<host-names>

could be the difference is irrilevant, but I suppose the previous is more secure.
Infact the new directory structure *doesn't requires* the use of open_basedir because /var/www is the root.

I don't know what happened before or if I configured something around to use /home/www or if there is something changed with the latest 2.2.10.

Could you help me?!?

Thanks in anticipation...

till
14th March 2007, 15:00
You may use any homedir with ISPConfig, you can set it when you use the expert installation mode.

If you update a existing ISPConfig, the homedir is not changed at all, only the preset for new installations has been changed from /home/www to /var/www because it is the default in most linux distributions.

gilas
15th March 2007, 09:37
I don't remember if I installed the previous version of ISPConfig using expert mode, but when I put within /home/www/ a folder with TYPO3 to share it with several sites I was forced to add some code in apache configuration (via web, ISPConfig admin panel) to grant the access to the folder.

Now using /var/www it is not the same and the access is free.

I suppose this happens because /var/www however is browsable and I think this is not good.

Then I ask you, thanking for your patience, how can I move my sites from /var/www to /home/www.

First I think to modify some lines in /etc/apache2/apache2.conf

changing the directory from /var/www to /home/www

but I don't know where ISPConfig is configured: maybe the only parameter I saw is stored in the table

isp_server, field: server_path_httpd_root (now is set to: /var/www)

If I change apache2.conf and modify the field and restart ISPConfig it is all OK?!?

Finally could be nice add an option within the admin control panel to set this...

thank you very much...

till
15th March 2007, 09:43
Dont change this folder! /var/www is the correct location.

Anyway, ISPConfig is not mady that you put any CMS directly in /var/www or /home/www, you must install the cms in a subdirectory like /var/www/web[ID]/web/

martinfst
15th March 2007, 09:44
First I think to modify some lines in /etc/apache2/apache2.confMy apache2.conf is modified, so /var/www is not browsable. Think this is a good suggestion. No index.<valid ext> = no access

gilas
15th March 2007, 10:26
Could be that I can put my CMS within a folder as suggested,
but the best way is to use an area out of each domain to be shared beetwen the sites actived.

MARTINFST wrote:
"My apache2.conf is modified, so /var/www is not browsable. Think this is a good suggestion. No index.<valid ext> = no access"

Which changes you made in apache2.conf?!?
Thank you again...

martinfst
15th March 2007, 11:00
.....
<Directory /var/www/sharedip>
Options +Includes -Indexes
AllowOverride None
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>
.......I just added the -Indexes to the Options

gilas
15th March 2007, 11:41
I verified my configuration:

<Directory /var/www/sharedip>
Options +Includes -Indexes
AllowOverride None
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>

it is the same of your code...!

-Indexes was yet configured.... are you sure?!?

martinfst
15th March 2007, 11:45
Sorry, I thought I remembered well, but apparently I did not. Just reviewed my personal installation guide and it says:Edit /etc/apache2/sites-available/default and add the lines Options None above the exiting lines and remove from the existing line Indexes. <Directory /var/www/>
Options None
#Options Indexes FollowSymLinks MultiViews
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>

gilas
15th March 2007, 12:04
hofff!!!!
Something doesn't work as expected. I added the line you suggested and restarted ispconfig server and apache server with no results.

To be true this is a symlink that starts from my directory:


lrwxrwxrwx 1 root root 25 2007-03-14 12:54 typo3_src -> /var/www/typo3_src-4.0.5/

this points to /var/www/typo3_src-4.0.5

I have another server with the previous version. There until added the following lines I can't use the /var/www/typo3_src-4.0.5/ contents (admin cpanel, ISP site->base):

<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_flag safe mode off
php_admin_value open_basedir '/home/www/site.domain.it/web/:/tmp:/home/www/typo3_src'
</IfModule>


In the new server this *not happens* and it is clear that /var/www is opened for all sites inside it...

Wainting for comments, thanx

gilas
16th March 2007, 14:39
Hi Folks,
I'm going to close this thread giving the right solution.

Infact when I put into apache directives these lines nothing was working:

<if module sapi.c > (.... etcetera ...) </if module>

instead using:

php_admin_value open_basedir '/var/www/yoursite.yourdomani.com/web/:/tmp:/home/www/typo3_src'

all is OK.

I installed sarge 3.1 under debian following 'the perfect setup instructions', but if you use <if module> and some other options (I don't know why...).
there are some problems (apache directives from ISPConfig admin panel...).

Passing the parameters as above all is OK.